/* ---------- 1. Fonts and reusable colors ---------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #090b0f;
    --bg-soft: #0f1218;
    --card: rgba(18, 22, 29, 0.82);
    --card-solid: #12161d;
    --text: #f4f6f8;
    --muted: #929aa7;
    --line: rgba(255, 255, 255, 0.09);
    --accent: #bcff44;
    --accent-dark: #8ed01e;
    --purple: #a885ff;
    --blue: #65bcff;
    --orange: #ff9b65;
    --green: #a9df78;
    --yellow: #ffe074;
    --container: 1180px;
    --radius: 22px;
}

/* ---------- 2. Page reset and basic styles ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    color: var(--text);
    background: var(--bg);
    font-family: 'Manrope', Arial, sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

::selection {
    color: #111;
    background: var(--accent);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
    font: inherit;
}

.container {
    width: min(calc(100% - 48px), var(--container));
    margin-inline: auto;
}

.section {
    position: relative;
    padding: 120px 0;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 20px;
    z-index: 1000;
    padding: 12px 18px;
    color: #111;
    background: var(--accent);
    border-radius: 8px;
    font-weight: 700;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 20px;
}

/* Soft background decoration */
.page-glow {
    position: fixed;
    z-index: -2;
    width: 500px;
    height: 500px;
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
}

.page-glow-one {
    top: -200px;
    left: -180px;
    background: var(--accent);
}

.page-glow-two {
    right: -240px;
    bottom: 10%;
    background: var(--purple);
}

.noise {
    position: fixed;
    z-index: -1;
    inset: 0;
    opacity: 0.035;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

/* ---------- 3. Header and navigation ---------- */
.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
    background: rgba(9, 11, 15, 0.82);
    border-color: var(--line);
    backdrop-filter: blur(18px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 82px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    color: #111;
    background: var(--accent);
    border-radius: 9px;
    font-family: 'DM Mono', monospace;
    font-size: 1rem;
    transform: rotate(-4deg);
}

.accent-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
}

.nav-link {
    position: relative;
    color: #a8aeb8;
    font-size: 0.86rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:not(.nav-contact)::after {
    position: absolute;
    right: 0;
    bottom: -9px;
    left: 0;
    height: 2px;
    content: '';
    background: var(--accent);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link.active::after,
.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-contact {
    padding: 10px 17px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.nav-contact:hover {
    color: #111;
    background: var(--accent);
    border-color: var(--accent);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    transition: transform 0.2s ease;
}

/* ---------- 4. Hero section ---------- */
.hero {
    display: grid;
    min-height: 100vh;
    padding-top: 145px;
    padding-bottom: 80px;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 80px;
    align-items: center;
}

.eyebrow,
.section-kicker {
    color: var(--accent);
    font-family: 'DM Mono', monospace;
    font-size: 0.73rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 8px 13px;
    color: #bec5ce;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line);
    border-radius: 100px;
}

.status-dot {
    position: relative;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(188, 255, 68, 0.08);
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(3.6rem, 6.2vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero h1 span {
    color: transparent;
    background: linear-gradient(110deg, var(--accent), #e2ffad 45%, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-subtitle {
    margin-top: 26px;
    color: #dfe3e8;
    font-size: clamp(1.12rem, 1.8vw, 1.4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hero-description {
    max-width: 530px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    min-height: 52px;
    padding: 0 21px;
    align-items: center;
    justify-content: center;
    gap: 24px;
    border-radius: 11px;
    font-size: 0.88rem;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    color: #0c0f08;
    background: var(--accent);
    box-shadow: 0 12px 30px rgba(188, 255, 68, 0.12);
}

.button-primary:hover {
    background: #c9ff68;
    box-shadow: 0 16px 38px rgba(188, 255, 68, 0.2);
    transform: translateY(-3px);
}

.text-link {
    color: #b9c0ca;
    font-size: 0.86rem;
    font-weight: 700;
}

.text-link span {
    display: inline-block;
    margin-left: 7px;
    color: var(--accent);
    transition: transform 0.2s ease;
}

.text-link:hover span {
    transform: translateY(4px);
}

.hero-stats {
    display: flex;
    gap: 0;
    margin-top: 58px;
}

.hero-stats > div {
    display: grid;
    padding: 0 30px;
    border-right: 1px solid var(--line);
}

.hero-stats > div:first-child {
    padding-left: 0;
}

.hero-stats > div:last-child {
    border-right: 0;
}

.hero-stats strong {
    font-size: 1.45rem;
    letter-spacing: -0.04em;
}

.hero-stats span {
    color: #737b87;
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
}

.hero-visual {
    position: relative;
    display: grid;
    min-height: 510px;
    place-items: center;
}

.hero-visual::before {
    position: absolute;
    width: 330px;
    height: 330px;
    content: '';
    background: var(--accent);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.08;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.orbit-one {
    width: 500px;
    height: 500px;
}

.orbit-two {
    width: 390px;
    height: 390px;
    border-style: dashed;
    animation: spin 28s linear infinite;
}

.code-window {
    position: relative;
    z-index: 2;
    width: min(100%, 470px);
    overflow: hidden;
    background: rgba(14, 17, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.42);
    transform: rotate(1.5deg);
    transition: transform 0.35s ease;
    backdrop-filter: blur(10px);
}

.hero-visual:hover .code-window {
    transform: rotate(0) translateY(-5px);
}

.window-bar,
.window-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #68707c;
    background: #11151a;
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
}

.window-bar {
    height: 49px;
    padding: 0 17px;
    border-bottom: 1px solid var(--line);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots span {
    width: 8px;
    height: 8px;
    background: #353b44;
    border-radius: 50%;
}

.window-dots span:first-child { background: #ff6d65; }
.window-dots span:nth-child(2) { background: #e9c458; }
.window-dots span:last-child { background: #67c76f; }

.file-name {
    margin-left: 15px;
}

.window-code-icon {
    color: var(--accent);
}

.code-content {
    min-height: 352px;
    padding: 27px 30px;
    color: #c8ced7;
    font-family: 'DM Mono', monospace;
    font-size: clamp(0.71rem, 1.1vw, 0.82rem);
    line-height: 2;
}

.indent { padding-left: 24px; }
.double-indent { padding-left: 48px; }
.code-purple { color: var(--purple); }
.code-blue { color: var(--blue); }
.code-orange { color: var(--orange); }
.code-green { color: var(--green); }
.code-yellow { color: var(--yellow); }
.code-comment { color: #555e69; }

.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 4px;
    vertical-align: middle;
    background: var(--accent);
    animation: blink 0.9s steps(2) infinite;
}

.window-footer {
    height: 38px;
    padding: 0 17px;
    border-top: 1px solid var(--line);
}

.footer-check {
    margin-right: 5px;
    color: var(--accent);
}

.floating-tag {
    position: absolute;
    z-index: 3;
    display: grid;
    width: 60px;
    height: 60px;
    place-items: center;
    color: #111;
    border-radius: 15px;
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: float 4s ease-in-out infinite;
}

.tag-html {
    top: 40px;
    right: 10px;
    background: var(--orange);
    transform: rotate(8deg);
}

.tag-js {
    bottom: 32px;
    left: 4px;
    background: var(--yellow);
    animation-delay: -2s;
    transform: rotate(-9deg);
}

.scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 13px;
    color: #5f6670;
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transform: translateX(-50%) rotate(90deg) translateX(50%);
    transform-origin: bottom center;
}

.scroll-line {
    width: 38px;
    height: 1px;
    overflow: hidden;
    background: #30353c;
}

.scroll-line::after {
    display: block;
    width: 50%;
    height: 100%;
    content: '';
    background: var(--accent);
    animation: scrollLine 2s ease-in-out infinite;
}

/* ---------- 5. Shared section headings ---------- */
.section-heading {
    display: flex;
    gap: 23px;
    margin-bottom: 55px;
    align-items: flex-start;
}

.section-number {
    margin-top: 8px;
    color: var(--accent);
    font-family: 'DM Mono', monospace;
    font-size: 0.67rem;
}

.section-heading h2 {
    margin-top: 6px;
    font-size: clamp(2.3rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

/* ---------- 6. About section ---------- */
.about {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.018), transparent);
    border-top: 1px solid var(--line);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 70px;
}

.about-card {
    position: relative;
    padding: 42px 45px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.about-card::after {
    position: absolute;
    bottom: -1px;
    left: 45px;
    width: 100px;
    height: 2px;
    content: '';
    background: var(--accent);
}

.quote-mark {
    position: absolute;
    top: 7px;
    right: 28px;
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 6rem;
    line-height: 1;
    opacity: 0.1;
}

.about-card p {
    position: relative;
    max-width: 700px;
    margin-bottom: 20px;
    color: #a4abb5;
    font-size: 1rem;
}

.about-card p:first-of-type {
    color: #e8eaed;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -0.03em;
}

.about-card p:last-child {
    margin-bottom: 0;
}

.about-details {
    display: grid;
    gap: 13px;
}

.detail-item {
    display: flex;
    padding: 20px 0;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}

.detail-icon {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    color: var(--accent);
    background: rgba(188, 255, 68, 0.07);
    border: 1px solid rgba(188, 255, 68, 0.15);
    border-radius: 11px;
    font-size: 1.1rem;
}

.football-icon {
    font-size: 0.95rem;
}

.detail-item div {
    display: grid;
}

.detail-item span:not(.detail-icon) {
    color: #6f7782;
    font-family: 'DM Mono', monospace;
    font-size: 0.63rem;
    text-transform: uppercase;
}

.detail-item strong {
    font-size: 0.95rem;
}

.fun-note {
    display: flex;
    margin-top: 15px;
    padding: 17px;
    gap: 12px;
    color: #a5acb5;
    background: rgba(188, 255, 68, 0.045);
    border: 1px dashed rgba(188, 255, 68, 0.25);
    border-radius: 13px;
    font-size: 0.79rem;
}

.fun-note > span,
.fun-note strong {
    color: var(--accent);
}

/* ---------- 7. Skills section ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.skill-card {
    position: relative;
    grid-column: span 2;
    min-height: 270px;
    padding: 27px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.skill-card:nth-child(4),
.skill-card:nth-child(5) {
    grid-column: span 3;
}

.skill-card:hover {
    background: #141920;
    border-color: rgba(188, 255, 68, 0.28);
    transform: translateY(-6px);
}

.skill-number {
    position: absolute;
    top: 22px;
    right: 23px;
    color: #424851;
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
}

.skill-icon {
    display: grid;
    width: 49px;
    height: 49px;
    margin-bottom: 27px;
    place-items: center;
    border-radius: 13px;
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
}

.html-icon { color: #ff9b65; background: rgba(255, 155, 101, 0.1); }
.css-icon { color: #65bcff; background: rgba(101, 188, 255, 0.1); }
.js-icon { color: #ffe074; background: rgba(255, 224, 116, 0.1); }
.web-icon { color: #a885ff; background: rgba(168, 133, 255, 0.1); }
.solve-icon { color: var(--accent); background: rgba(188, 255, 68, 0.1); }

.skill-card h3 {
    margin-bottom: 7px;
    font-size: 1.06rem;
}

.skill-card p {
    max-width: 340px;
    color: #7d8590;
    font-size: 0.81rem;
}

.skill-line {
    position: absolute;
    right: 27px;
    bottom: 25px;
    left: 27px;
    height: 2px;
    overflow: hidden;
    background: #292e35;
}

.skill-line span {
    display: block;
    width: var(--level);
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease 0.25s;
}

.skill-card.visible .skill-line span {
    transform: scaleX(1);
}

/* ---------- 8. Projects section ---------- */
.projects {
    background: #0c0f14;
    border-block: 1px solid var(--line);
}

.projects-heading {
    justify-content: space-between;
    align-items: flex-end;
}

.heading-with-number {
    display: flex;
    gap: 23px;
}

.heading-note {
    max-width: 260px;
    padding-bottom: 7px;
    color: var(--muted);
    font-size: 0.82rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.project-card {
    overflow: hidden;
    background: var(--card-solid);
    border: 1px solid var(--line);
    border-radius: 20px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.project-card:hover {
    border-color: rgba(188, 255, 68, 0.25);
    transform: translateY(-7px);
}

.project-preview {
    position: relative;
    display: grid;
    height: 225px;
    overflow: hidden;
    place-items: center;
    border-bottom: 1px solid var(--line);
}

.preview-portfolio {
    background: radial-gradient(circle at 75% 25%, rgba(188, 255, 68, 0.18), transparent 35%), #111711;
}

.preview-football {
    background: radial-gradient(circle at center, rgba(70, 170, 95, 0.18), transparent 60%), #0d1711;
}

.preview-app {
    background: radial-gradient(circle at 25% 75%, rgba(168, 133, 255, 0.18), transparent 40%), #121019;
}

.project-label {
    position: absolute;
    top: 17px;
    left: 18px;
    z-index: 2;
    padding: 5px 9px;
    color: #abb2bb;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: 20px;
    font-family: 'DM Mono', monospace;
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.preview-number {
    position: absolute;
    right: 15px;
    bottom: -17px;
    color: rgba(255, 255, 255, 0.04);
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
}

.mini-browser {
    width: 72%;
    overflow: hidden;
    background: #171d1b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

.project-card:hover .mini-browser {
    transform: rotate(0deg) scale(1.03);
}

.mini-top {
    display: flex;
    height: 21px;
    padding-left: 9px;
    align-items: center;
    gap: 4px;
    background: #202722;
}

.mini-top i {
    width: 4px;
    height: 4px;
    background: #555f58;
    border-radius: 50%;
}

.mini-page {
    display: grid;
    height: 119px;
    padding: 22px;
    align-content: center;
    justify-items: start;
}

.mini-page > span {
    width: 38%;
    height: 4px;
    margin-bottom: 7px;
    background: #7b896f;
    border-radius: 5px;
}

.mini-page > strong {
    width: 72%;
    height: 11px;
    margin-bottom: 7px;
    background: var(--accent);
    border-radius: 3px;
}

.mini-page > span:nth-of-type(2) {
    width: 60%;
    background: #414941;
}

.mini-page div {
    display: flex;
    margin-top: 15px;
    gap: 7px;
}

.mini-page div i {
    width: 34px;
    height: 22px;
    background: #252d27;
    border-radius: 3px;
}

.pitch {
    position: relative;
    width: 74%;
    height: 135px;
    overflow: hidden;
    background: repeating-linear-gradient(90deg, #19331f 0, #19331f 34px, #162e1c 34px, #162e1c 68px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    transform: perspective(500px) rotateX(10deg) rotateZ(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pitch-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.28);
}

.pitch-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 51px;
    height: 51px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    font-size: 1.2rem;
    transform: translate(-50%, -50%);
}

.goal {
    position: absolute;
    top: 35%;
    width: 21px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.goal-left { left: -1px; border-left: 0; }
.goal-right { right: -1px; border-right: 0; }

.app-widget {
    width: 68%;
    padding: 21px;
    background: rgba(30, 26, 42, 0.84);
    border: 1px solid rgba(168, 133, 255, 0.22);
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    transform: rotate(3deg);
    transition: transform 0.3s ease;
}

.project-card:hover .app-widget {
    transform: rotate(0deg) scale(1.03);
}

.app-symbol {
    display: grid;
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    place-items: center;
    color: #14100a;
    background: var(--yellow);
    border-radius: 8px;
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    font-weight: 800;
}

.app-lines {
    display: grid;
    gap: 7px;
}

.app-lines span {
    width: 100%;
    height: 5px;
    background: #3b354a;
    border-radius: 4px;
}

.app-lines span:nth-child(2) { width: 74%; }
.app-lines span:nth-child(3) { width: 86%; }

.app-button {
    width: max-content;
    margin-top: 17px;
    padding: 6px 11px;
    color: #18121e;
    background: var(--purple);
    border-radius: 6px;
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    font-weight: 700;
}

.project-info {
    padding: 26px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.project-tags span {
    padding: 4px 7px;
    color: #777f8a;
    background: rgba(255, 255, 255, 0.035);
    border-radius: 4px;
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    text-transform: uppercase;
}

.project-info h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.project-info p {
    min-height: 76px;
    color: #818995;
    font-size: 0.79rem;
}

.project-link {
    display: flex;
    margin-top: 22px;
    padding-top: 18px;
    align-items: center;
    justify-content: space-between;
    color: #d9dde2;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    font-weight: 700;
}

.project-link span {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    color: var(--accent);
    background: rgba(188, 255, 68, 0.07);
    border-radius: 50%;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.project-link:hover span {
    color: #111;
    background: var(--accent);
    transform: rotate(45deg);
}

/* ---------- 9. Contact and footer ---------- */
.contact {
    padding-top: 130px;
    padding-bottom: 70px;
}

.contact-panel {
    position: relative;
    overflow: hidden;
    padding: 86px 30px 38px;
    text-align: center;
    background: linear-gradient(145deg, #11151a, #0e1216);
    border: 1px solid var(--line);
    border-radius: 28px;
}

.contact-panel::before,
.contact-panel::after {
    position: absolute;
    width: 220px;
    height: 220px;
    content: '';
    border: 1px solid rgba(188, 255, 68, 0.08);
    border-radius: 50%;
}

.contact-panel::before { top: -110px; left: -70px; }
.contact-panel::after { right: -70px; bottom: -130px; }

.contact-orb {
    position: absolute;
    top: 20%;
    left: 50%;
    width: 300px;
    height: 150px;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.08;
    transform: translateX(-50%);
}

.contact-panel h2 {
    position: relative;
    margin-top: 12px;
    font-size: clamp(2.7rem, 6vw, 5.1rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.contact-panel h2 span {
    color: var(--accent);
}

.contact-copy {
    max-width: 500px;
    margin: 22px auto 28px;
    color: var(--muted);
    font-size: 0.9rem;
}

.contact-button {
    position: relative;
    min-width: 170px;
}

.social-links {
    display: flex;
    margin-top: 70px;
    padding-top: 28px;
    justify-content: center;
    gap: 45px;
    border-top: 1px solid var(--line);
}

.social-links a {
    color: #818995;
    font-family: 'DM Mono', monospace;
    font-size: 0.66rem;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.social-links a span {
    margin-left: 5px;
    color: var(--accent);
}

.social-links a:hover {
    color: var(--text);
}

.site-footer {
    padding: 28px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #5c636d;
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
}

.footer-logo {
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
}

.footer-logo .logo-mark {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
}

.footer-inner p span {
    color: var(--accent);
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    padding: 13px 18px;
    color: #111;
    background: var(--accent);
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 10. Scroll reveal animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Give cards a slightly staggered animation */
.skills-grid .reveal:nth-child(2),
.projects-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.skills-grid .reveal:nth-child(3),
.projects-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.skills-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.skills-grid .reveal:nth-child(5) { transition-delay: 0.32s; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -12px; }
}

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes scrollLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ---------- 11. Tablet layout ---------- */
@media (max-width: 960px) {
    .section { padding: 95px 0; }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-copy {
        max-width: 720px;
    }

    .hero h1 {
        font-size: clamp(4rem, 11vw, 6rem);
    }

    .hero-visual {
        min-height: 500px;
    }

    .code-window {
        width: min(90%, 540px);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill-card,
    .skill-card:nth-child(4),
    .skill-card:nth-child(5) {
        grid-column: span 1;
    }

    .skill-card:last-child {
        grid-column: 1 / -1;
    }

    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }

    .project-card:last-child {
        grid-column: 1 / -1;
        max-width: calc(50% - 9px);
        justify-self: center;
    }

    .scroll-cue { display: none; }
}

/* ---------- 12. Phone layout ---------- */
@media (max-width: 700px) {
    .container {
        width: min(calc(100% - 32px), var(--container));
    }

    .section {
        padding: 78px 0;
    }

    .navbar {
        height: 72px;
    }

    .menu-button {
        display: block;
    }

    .menu-button.active span:first-child {
        transform: translateY(3.5px) rotate(45deg);
    }

    .menu-button.active span:last-child {
        transform: translateY(-3.5px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 72px;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        padding: 50px 24px;
        flex-direction: column;
        gap: 24px;
        background: rgba(9, 11, 15, 0.98);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-15px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.4rem;
    }

    .nav-contact {
        margin-top: 10px;
        padding: 12px 25px;
        font-size: 1rem;
    }

    .hero {
        min-height: auto;
        padding-top: 125px;
        padding-bottom: 65px;
    }

    .hero-grid {
        gap: 25px;
    }

    .eyebrow {
        font-size: 0.6rem;
    }

    .hero h1 {
        font-size: clamp(3.2rem, 16vw, 4.8rem);
    }

    .hero-subtitle {
        margin-top: 22px;
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .hero-stats {
        margin-top: 45px;
    }

    .hero-stats > div {
        padding: 0 16px;
    }

    .hero-stats strong {
        font-size: 1.2rem;
    }

    .hero-stats span {
        font-size: 0.53rem;
    }

    .hero-visual {
        min-height: 420px;
    }

    .orbit-one { width: 390px; height: 390px; }
    .orbit-two { width: 300px; height: 300px; }

    .code-window {
        width: 100%;
    }

    .code-content {
        min-height: 295px;
        padding: 21px 17px;
        font-size: 0.62rem;
    }

    .floating-tag {
        width: 48px;
        height: 48px;
        font-size: 0.65rem;
    }

    .tag-html { top: 12px; right: -6px; }
    .tag-js { bottom: 8px; left: -5px; }

    .section-heading,
    .heading-with-number {
        gap: 15px;
    }

    .section-heading {
        margin-bottom: 38px;
    }

    .about-card {
        padding: 31px 25px;
    }

    .about-card p:first-of-type {
        font-size: 1.15rem;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skill-card,
    .skill-card:nth-child(4),
    .skill-card:nth-child(5),
    .skill-card:last-child,
    .project-card:last-child {
        grid-column: auto;
        max-width: none;
    }

    .skill-card {
        min-height: 245px;
    }

    .projects-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .heading-note {
        padding-left: 29px;
    }

    .project-info p {
        min-height: auto;
    }

    .contact {
        padding-top: 80px;
        padding-bottom: 45px;
    }

    .contact-panel {
        width: calc(100% - 24px);
        padding: 65px 20px 28px;
        border-radius: 22px;
    }

    .contact-panel h2 {
        font-size: clamp(2.5rem, 13vw, 4rem);
    }

    .social-links {
        margin-top: 55px;
        gap: 18px;
    }

    .social-links a {
        font-size: 0.55rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* Respect the user's reduced-motion accessibility setting */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
