:root {
    --bg: #060706;
    --bg-elevated: #0d0f0d;
    --bg-card: #0a0b0a;
    --bg-card-hover: #101210;

    --text: #ece9e4;
    --text-muted: #8b9089;
    --text-dim: #4a4f4a;

    --green: #2fa968;
    --green-bright: #45d685;
    --green-dim: #12261a;
    --green-line: rgba(47, 169, 104, 0.35);

    --red: #9c3a3a;
    --red-bright: #c24f4f;
    --red-dim: #241212;

    --border: #1a1c1a;
    --border-light: #262924;

    --font-heading: "Space Grotesk", sans-serif;
    --font-body: "Inter", sans-serif;
    --font-mono: "JetBrains Mono", monospace;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    cursor: none;
    -webkit-tap-highlight-color: transparent;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

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

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: none;
    border: none;
    background: none;
    color: inherit;
}

input,
textarea {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

::selection {
    background: var(--green);
    color: var(--bg);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 10001;
    background: var(--green);
    color: var(--bg);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
}

.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 1px solid var(--green);
    outline-offset: 3px;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.9s var(--ease-in-out);
}

.loader.done {
    transform: translateY(-100%);
}

.loader-inner {
    text-align: center;
}

.loader-logo {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 1.25rem;
    object-fit: contain;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text);
    display: block;
    margin-bottom: 2rem;
}

.loader-bar {
    width: 160px;
    height: 2px;
    background: var(--border);
    margin: 0 auto;
    border-radius: 1px;
    overflow: hidden;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--green);
    border-radius: 1px;
    transition: width 0.3s ease;
}

.loader-percent {
    display: block;
    margin-top: 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition:
        width 0.3s var(--ease-out-expo),
        height 0.3s var(--ease-out-expo),
        background 0.3s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(236, 233, 228, 0.25);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition:
        width 0.4s var(--ease-out-expo),
        height 0.4s var(--ease-out-expo),
        border-color 0.3s ease,
        opacity 0.3s ease;
}

.cursor.hovering {
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid var(--green);
    mix-blend-mode: normal;
}

.cursor-follower.hovering {
    width: 60px;
    height: 60px;
    border-color: transparent;
    opacity: 0;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    opacity: 0.035;
    background-repeat: repeat;
    background-size: 256px 256px;
}

#canvas-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 3rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text);
}

.nav-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nav-logo-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--green-line);
    border-radius: 50%;
    color: var(--green);
    font-size: 0.7rem;
}

.nav-logo-name {
    text-transform: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-cta {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text);
    border: 1px solid var(--border-light);
    padding: 0.55rem 1.4rem;
    border-radius: 100px;
    transition:
        border-color 0.3s ease,
        color 0.3s ease,
        background 0.3s ease;
}

.nav-cta:hover {
    border-color: var(--green);
    color: var(--green);
}

.nav-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 250;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition:
        transform 0.35s var(--ease-out-expo),
        opacity 0.3s ease,
        background 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(-3.75px) rotate(-45deg);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: var(--bg);
    clip-path: circle(0px at calc(100% - 3.2rem) 2.5rem);
    transition: clip-path 0.7s var(--ease-in-out);
    display: flex;
    pointer-events: none;
    overflow: hidden;
}

.nav-overlay.open {
    clip-path: circle(150% at calc(100% - 3.2rem) 2.5rem);
    pointer-events: auto;
}

.nav-overlay-inner {
    width: 100%;
    max-width: 1400px;
    min-height: 0;
    margin: 0 auto;
    padding: 8rem 3rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.nav-overlay-links {
    display: flex;
    flex-direction: column;
}

.nav-overlay-links li {
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.nav-overlay-links a {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding: 1.1rem 0;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    transition:
        color 0.3s ease,
        padding-left 0.4s var(--ease-out-expo);
    opacity: 0;
    transform: translateY(30px);
}

.nav-overlay.open .nav-overlay-links a {
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay-links a:hover {
    color: var(--green);
    padding-left: 0.75rem;
}

.nav-overlay-index {
    display: inline-block;
    width: 2ch;
    flex: 0 0 2ch;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--red-bright);
}

.nav-overlay-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: clamp(2.5rem, 10vh, 7rem);
    padding-top: 2rem;
    padding-bottom: 1rem;
    border-top: 1px solid var(--border);
}

.nav-overlay-contact a {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-overlay-social {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.6rem;
}

.nav-overlay-social a {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.nav-overlay-social a:hover {
    color: var(--green);
}

.nav-overlay-loc {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 3rem 5rem;
}

.hero-grid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    align-items: center;
}

.hero-content,
.terminal,
.about-text,
.about-stats,
.contact-head,
.contact-form {
    min-width: 0;
}

.hero-tag {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
}

.hero-tag-line {
    display: block;
    width: 40px;
    height: 1px;
    background: var(--green);
}

.hero-tag-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.6rem, 6.4vw, 5.6rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin-bottom: 1.75rem;
}

.title-line {
    display: block;
    overflow: hidden;
}

.title-line-inner {
    display: block;
    transform: translateY(110%);
}

.title-line.accent {
    color: var(--green);
}

.dot {
    color: var(--red-bright);
}

.hero-sub {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 460px;
    opacity: 0;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    opacity: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.75rem;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.4s var(--ease-out-expo);
}

.btn-primary {
    background: var(--green);
    color: var(--bg);
    border: 1px solid var(--green);
}

.btn-primary:hover {
    background: var(--green-bright);
    border-color: var(--green-bright);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border-light);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--red-bright);
    color: var(--red-bright);
}

.terminal {
    background: #050605;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(47, 169, 104, 0.06);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: min(480px, 60svh);
    min-height: 300px;
    scroll-margin-top: 5.5rem;
    transition: transform 0.45s var(--ease-out-expo), box-shadow 0.45s ease;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.8rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
    padding: 0;
    border: 0;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.terminal-dot:hover,
.terminal-dot:focus-visible {
    transform: scale(1.35);
    filter: brightness(1.25);
}

.terminal-dot:focus-visible {
    outline: 1px solid var(--text);
    outline-offset: 3px;
}

.dot-red {
    background: var(--red);
}

.dot-yellow {
    background: #7a6a2e;
}

.dot-green {
    background: var(--green);
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    margin: 0 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.terminal-header-spacer {
    width: 46px;
}

.terminal-restore {
    display: none;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    white-space: nowrap;
}

.terminal-restore:hover,
.terminal-restore:focus-visible {
    color: var(--green-bright);
    border-color: var(--green);
}

.terminal.is-minimized .terminal-body,
.terminal.is-minimized .terminal-input-row {
    display: none;
}

.terminal.is-minimized {
    height: auto;
    min-height: 0;
}

.terminal.is-closed {
    height: auto;
    min-height: 0;
}

.terminal.is-closed .terminal-body {
    display: block;
    flex: none;
    max-height: 5.5rem;
    overflow: hidden;
}

.terminal.is-closed .terminal-input-row {
    display: none;
}

.terminal.is-closed .terminal-restore {
    display: block;
}

.terminal.is-maximized {
    position: relative;
    inset: auto;
    z-index: 2;
    grid-column: auto;
    width: 100%;
    max-width: none;
    height: min(70svh, 680px);
    min-height: 360px;
    animation: terminal-maximize 0.45s var(--ease-out-expo) both;
    box-shadow:
        0 35px 90px -25px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(47, 169, 104, 0.14);
}

@keyframes terminal-maximize {
    from {
        opacity: 0.7;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.terminal-body {
    flex: 1;
    min-height: 0;
    padding: 1.1rem 1.15rem;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.65;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: auto;
}

.terminal-line {
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 0.15rem;
}

.terminal-welcome {
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.terminal-line .t-cmd {
    color: var(--green-bright);
}

.t-prompt-echo {
    color: var(--text-muted);
}

.t-prompt-echo .t-user {
    color: var(--green-bright);
}

.t-error {
    color: var(--red-bright);
}

.t-accent {
    color: var(--green-bright);
}

.t-dim {
    color: var(--text-dim);
}

.t-heading {
    color: var(--text);
    font-weight: 600;
}

.terminal-input-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.15rem;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.4;
    min-width: 0;
}

.terminal-prompt {
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
    color: var(--green-bright);
    white-space: nowrap;
    flex-shrink: 0;
}

.terminal-line-current {
    display: inline-flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    color: var(--text);
    word-break: break-all;
}

#terminal-typed {
    white-space: pre-wrap;
}

.terminal-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0.7rem 1.15rem;
    border: 0;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    font-family: var(--font-mono);
    font-size: 16px;
    outline: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.terminal-cursor {
    display: inline-block;
    width: 7px;
    height: 1.05em;
    margin-left: 1px;
    background: var(--green-bright);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
    flex-shrink: 0;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

.scroll-indicator {
    position: absolute;
    right: 3rem;
    bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
}

.scroll-indicator span {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    writing-mode: vertical-lr;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: var(--border-light);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--green);
    animation: scrollLine 2s var(--ease-in-out) infinite;
}

@keyframes scrollLine {
    0% {
        top: -100%;
    }

    50% {
        top: 0%;
    }

    100% {
        top: 100%;
    }
}

#marquee {
    position: relative;
    z-index: 2;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 28s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 0 1.5rem;
    flex-shrink: 0;
}

.marquee-content span {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    white-space: nowrap;
}

.marquee-dot {
    font-size: 0.5rem !important;
    color: var(--red-bright) !important;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

.section-header {
    margin-bottom: 4rem;
}

.section-tag {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.tag-line {
    display: block;
    width: 30px;
    height: 1px;
    background: var(--green);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

section {
    position: relative;
    z-index: 2;
    background: var(--bg);
}

#about {
    padding: 8rem 0;
}

.about-top {
    margin-bottom: 3rem;
}

.about-headline {
    margin-bottom: 5rem;
    display: flex;
    flex-direction: column;
    gap: 0.12em;
}

.about-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5.4vw, 4.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.about-title em {
    font-style: normal;
    color: var(--green);
}

.about-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.about-text strong {
    color: var(--text);
    font-weight: 500;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: left;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 3.6vw, 3.2rem);
    font-weight: 700;
    color: var(--green);
    line-height: 1;
}

.stat-suffix {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-weight: 500;
    color: var(--text-muted);
}

.stat-label {
    display: block;
    margin-top: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

#skills {
    padding: 6rem 0 8rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
}

.skill-group {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.skill-group-title {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.skill-group-index {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--red-bright);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tags li {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    transition:
        border-color 0.3s ease,
        color 0.3s ease,
        background 0.3s ease;
}

.skill-tags li:hover {
    border-color: var(--green-line);
    color: var(--text);
    background: var(--green-dim);
}

#projects {
    padding: 6rem 0 8rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem;
    transition:
        border-color 0.4s ease,
        transform 0.15s ease,
        background 0.4s ease;
    will-change: transform;
}

.project-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.project-index {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--red-bright);
    margin-bottom: 1rem;
}

.project-name {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-name {
    color: var(--green);
}

.project-desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 480px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.project-tags li {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--text-dim);
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 100px;
}

.project-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-github {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.project-github:hover {
    color: var(--green);
}

.project-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-dim);
    transition: all 0.4s var(--ease-out-expo);
}

.project-card:hover .project-arrow {
    background: var(--green);
    border-color: var(--green);
    color: var(--bg);
    transform: scale(1.08);
}

.project-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.project-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.project-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 3, 2, 0.8);
    backdrop-filter: blur(6px);
}

.project-modal-panel {
    position: relative;
    width: min(560px, 100%);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.75rem;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s var(--ease-out-expo);
}

.project-modal.open .project-modal-panel {
    transform: translateY(0) scale(1);
}

.project-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    color: var(--text-muted);
    transition:
        color 0.3s ease,
        border-color 0.3s ease;
}

.project-modal-close:hover {
    color: var(--red-bright);
    border-color: var(--red-bright);
}

.project-modal-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--green-bright);
}

.project-modal-title {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 700;
    margin: 0.75rem 0 1rem;
}

.project-modal-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.project-modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.project-modal-tech li {
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 100px;
}

.project-modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.project-modal-links .btn-outline {
    padding: 0.9rem 1.5rem;
}

#experience {
    padding: 6rem 0 8rem;
}

.timeline {
    border-top: 1px solid var(--border);
}

.timeline-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 1.5rem;
    padding: 2.75rem 0;
    border-bottom: 1px solid var(--border);
}

.timeline-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green);
    margin-top: 0.4rem;
    box-shadow: 0 0 0 4px var(--green-dim);
}

.timeline-title {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.timeline-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-muted);
    max-width: 640px;
}

#education {
    padding: 0 0 8rem;
}

.edu-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.edu-years {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--red-bright);
    white-space: nowrap;
}

.edu-name {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.edu-degree {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.edu-loc {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-dim);
    white-space: nowrap;
}

#services {
    padding: 6rem 0 8rem;
}

.services-list {
    border-top: 1px solid var(--border);
}

.service-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr 50px;
    align-items: start;
    gap: 2rem;
    padding: 2.75rem 0;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.4s ease;
    position: relative;
}

.service-row::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: var(--green);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.service-row:hover::before {
    opacity: 0.035;
}

.service-row:hover {
    border-bottom-color: var(--border-light);
}

.service-index {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    padding-top: 0.3rem;
    transition: color 0.4s ease;
}

.service-row:hover .service-index {
    color: var(--green);
}

.service-name {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.6vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    transition: color 0.4s ease;
}

.service-row:hover .service-name {
    color: var(--green);
}

.service-desc {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 420px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.3rem;
}

.service-tags li {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    transition:
        border-color 0.3s ease,
        color 0.3s ease;
}

.service-row:hover .service-tags li {
    border-color: var(--border-light);
    color: var(--text);
}

.service-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-dim);
    transition: all 0.4s var(--ease-out-expo);
    margin-top: 0.15rem;
}

.service-row:hover .service-arrow {
    background: var(--green);
    border-color: var(--green);
    color: var(--bg);
    transform: scale(1.1);
}

#certifications {
    padding: 6rem 0 8rem;
}

.cert-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cert-category {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    overflow: hidden;
}

.cert-category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.cert-category-title::-webkit-details-marker {
    display: none;
}

.cert-chevron {
    color: var(--text-muted);
    transition:
        transform 0.35s var(--ease-out-expo),
        color 0.3s ease;
}

.cert-category[open] .cert-chevron {
    transform: rotate(180deg);
    color: var(--green);
}

.cert-category-title:hover .cert-chevron {
    color: var(--green);
}

.cert-list {
    padding: 0 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-top: 1px solid var(--border);
}

.cert-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-top: 1.5rem;
    flex-wrap: wrap;
}

.cert-item-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.cert-item-main h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.cert-item-main p {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cert-focus {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    font-style: italic;
}

.cert-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--green-bright);
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.cert-link:hover {
    border-color: var(--green-bright);
}

#resume {
    padding: 0 0 8rem;
}

.resume-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.resume-info .section-title {
    margin-top: 0.5rem;
}

.resume-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

#contact {
    padding: 8rem 0 6rem;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0.75rem 0 1.25rem;
}

.cta-sub {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 440px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    max-width: 420px;
    transition: border-color 0.3s ease;
}

.contact-link:hover {
    border-color: var(--green-line);
}

.contact-link-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}

.contact-link-value {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    transition: color 0.3s ease;
    overflow-wrap: anywhere;
}

.contact-link:hover .contact-link-value {
    color: var(--green);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.form-row input,
.form-row textarea {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 16px;
    color: var(--text);
    resize: vertical;
    transition: border-color 0.3s ease;
    width: 100%;
}

.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--text-muted);
}

.form-row input:focus-visible,
.form-row textarea:focus-visible {
    outline: none;
    box-shadow: none;
}

.form-row input.invalid,
.form-row textarea.invalid {
    border-color: var(--red-bright);
}

.form-error {
    font-size: 0.75rem;
    color: var(--red-bright);
    min-height: 1em;
}

.form-submit {
    align-self: flex-start;
    margin-top: 0.5rem;
}

.form-status {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    min-height: 1.2em;
}

.form-status.success {
    color: var(--green-bright);
}

.form-status.error {
    color: var(--red-bright);
}

#footer {
    position: relative;
    z-index: 2;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 2.5rem 3rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.footer-logo-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.footer-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.footer-role {
    display: block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.footer-copy {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.footer-right {
    display: flex;
    gap: 2rem;
}

.footer-link {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--green);
}

.reveal-up {
    opacity: 0;
    transform: translateY(50px);
}

.reveal-fade {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {

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

    .title-line-inner {
        transform: translateY(0) !important;
    }

    .reveal-up,
    .hero-tag,
    .hero-sub,
    .hero-actions,
    .scroll-indicator {
        opacity: 1 !important;
        transform: none !important;
    }
}

@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .terminal {
        height: 420px;
        max-width: 640px;
    }

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

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

    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 1024px) {
    .service-row {
        grid-template-columns: 60px 1fr 50px;
    }

    .service-tags {
        display: none;
    }

    .about-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #nav {
        padding: 1.25rem 1.5rem;
    }

    .nav-cta {
        display: none;
    }

    .nav-overlay {
        clip-path: circle(0px at calc(100% - 2.9rem) 2.4rem);
    }

    .nav-overlay.open {
        clip-path: circle(150% at calc(100% - 2.9rem) 2.4rem);
    }

    .nav-overlay-inner {
        padding: 7rem 1.5rem 2rem;
        justify-content: flex-start;
        overflow-y: auto;
    }

    .nav-overlay-footer {
        margin-top: 2rem;
        padding-bottom: 1rem;
    }

    #hero {
        padding: 7rem 1.5rem 3rem;
    }

    .hero-title {
        font-size: clamp(2.2rem, 11vw, 3.6rem);
    }

    .terminal {
        height: min(440px, 58svh);
        min-height: 280px;
    }

    .terminal.is-maximized {
        grid-column: auto;
        height: min(70svh, 640px);
        min-height: 360px;
    }

    .terminal.keyboard-open,
    .terminal.is-maximized.keyboard-open {
        height: var(--terminal-keyboard-height, 320px);
        min-height: 220px;
        max-height: none;
    }

    .scroll-indicator {
        display: none;
    }

    .section-container {
        padding: 0 1.5rem;
    }

    #about,
    #skills,
    #projects,
    #experience,
    #education,
    #services,
    #certifications,
    #resume {
        padding: 4.5rem 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-arrow {
        display: none;
    }

    .about-title {
        font-size: clamp(1.9rem, 8vw, 3rem);
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .edu-card {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 1rem;
    }

    .resume-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .resume-actions,
    .resume-actions .btn {
        width: 100%;
    }

    .resume-actions .btn {
        justify-content: center;
    }

    #contact {
        padding: 5rem 0 4rem;
    }

    .cta-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    #footer {
        padding: 1.75rem 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
    }

    .footer-right {
        gap: 1.5rem;
    }

    .cursor,
    .cursor-follower {
        display: none;
    }

    body {
        cursor: auto;
    }

    a,
    button {
        cursor: pointer;
    }
}

@media (max-width: 480px) {

    .section-container,
    #hero {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-tag-text {
        font-size: 0.68rem;
        letter-spacing: 0.06em;
    }

    .hero-actions,
    .hero-actions .btn {
        width: 100%;
    }

    .hero-actions .btn {
        justify-content: center;
    }

    .terminal-input-row {
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.35rem;
    }

    .terminal-prompt {
        width: auto;
        flex: 0 0 auto;
    }

    .terminal-line-current {
        width: auto;
        flex: 1 1 auto;
        overflow: hidden;
    }

    .terminal-input {
        top: 0;
        height: 100%;
    }

    .about-headline {
        gap: 0.2em;
        margin-bottom: 3rem;
    }

    .project-name {
        font-size: 1.4rem;
    }

    .cert-category-title {
        padding: 1.25rem 1.5rem;
        font-size: 0.95rem;
    }

    .cert-list {
        padding: 0 1.5rem 1.5rem;
    }

    .cert-item-main,
    .cert-item-links {
        min-width: 0;
        width: 100%;
    }

    .cert-link {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding-top: 6rem;
    }

    .terminal {
        height: 300px;
        min-height: 0;
    }

    .terminal.is-maximized {
        height: calc(100svh - 7rem);
        min-height: 260px;
    }

    .nav-overlay-inner {
        padding-top: 5rem;
        overflow-y: auto;
    }
}