:root {
    color-scheme: dark;
    --bg: #090907;
    --bg-soft: #11110e;
    --surface: rgba(24, 24, 20, 0.78);
    --surface-strong: #171814;
    --text: #f7f4ea;
    --text-soft: #d5d0c3;
    --muted: #9f9a8d;
    --line: rgba(247, 244, 234, 0.12);
    --line-strong: rgba(247, 244, 234, 0.22);
    --accent: #62d9c9;
    --accent-warm: #ffb86b;
    --accent-violet: #b69cff;
    --danger: #ff7a7a;
    --success: #80e6a5;
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 24px 70px rgba(0, 0, 0, 0.34);
    --radius: 8px;
    --radius-sm: 6px;
    --container: 1180px;
    --header-height: 76px;
    --transition: 180ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 28px);
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background:
        linear-gradient(120deg, rgba(98, 217, 201, 0.08), transparent 28rem),
        linear-gradient(300deg, rgba(255, 184, 107, 0.07), transparent 34rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

body.nav-open {
    overflow: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

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

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

::selection {
    background: rgba(98, 217, 201, 0.28);
    color: var(--text);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 2000;
    transform: translateY(-150%);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #05110f;
    font-weight: 800;
    transition: transform var(--transition);
}

.skip-link:focus {
    transform: translateY(0);
}

.page-shell {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(247, 244, 234, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(247, 244, 234, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.scroll-bar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2001;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-warm), var(--accent-violet));
}

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

.section-pad {
    padding: 118px 0;
}

.soft-section {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.028), transparent);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid transparent;
    background: rgba(9, 9, 7, 0.66);
    backdrop-filter: blur(18px);
    transition: border-color var(--transition), background var(--transition);
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
    background: rgba(9, 9, 7, 0.86);
}

.header-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(98, 217, 201, 0.18), rgba(255, 184, 107, 0.12));
    color: var(--text);
    font-size: 0.82rem;
}

.brand-text {
    color: var(--text-soft);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
}

.site-nav a {
    padding: 0.55rem 0.78rem;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    transition: color var(--transition), background var(--transition);
}

.site-nav a:hover,
.site-nav a.is-active {
    background: rgba(98, 217, 201, 0.1);
    color: var(--text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--text);
    transition: transform var(--transition);
}

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

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.82rem 1.05rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        color var(--transition),
        box-shadow var(--transition);
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--accent);
    color: #041210;
    box-shadow: 0 12px 28px rgba(98, 217, 201, 0.18);
}

.button-primary:hover {
    background: #82eadf;
}

.button-secondary,
.button-ghost {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
}

.button-secondary:hover,
.button-ghost:hover {
    border-color: rgba(98, 217, 201, 0.58);
    background: rgba(98, 217, 201, 0.09);
}

.button-small {
    min-height: 40px;
    padding: 0.7rem 0.88rem;
    font-size: 0.9rem;
}

.button-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.hero {
    min-height: 100svh;
    display: grid;
    align-items: center;
    padding-top: calc(var(--header-height) + 72px);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
    gap: clamp(42px, 7vw, 92px);
    align-items: center;
}

.eyebrow,
.card-kicker {
    margin: 0 0 16px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.section-intro h2,
.section-heading h2,
.contact-copy h2,
.education-panel h2 {
    margin: 0;
    letter-spacing: 0;
    line-height: 1.02;
}

.hero h1 {
    max-width: 820px;
    font-size: clamp(3rem, 7vw, 6rem);
}

.hero-lead {
    max-width: 690px;
    margin: 28px 0 0;
    color: var(--text-soft);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0;
}

.hero-meta span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.46rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 750;
}

.hero-actions,
.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.social-row a,
.footer-links a {
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 800;
    transition: color var(--transition);
}

.social-row a {
    padding: 0.45rem 0.62rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
}

.social-row a:hover,
.footer-links a:hover {
    color: var(--accent);
}

.social-row a:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.hero-visual {
    display: grid;
    gap: 18px;
}

.portrait-block,
.hero-card,
.metric,
.focus-grid article,
.skill-card,
.process-grid article,
.education-panel,
.contact-form,
.contact-methods a,
.browser-mockup {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(18px);
}

.portrait-block {
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.portrait-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card {
    padding: 24px;
}

.hero-card h2 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.1;
}

.signal-list,
.project-facts {
    display: grid;
    gap: 14px;
    margin: 22px 0 0;
}

.signal-list div,
.project-facts div {
    display: grid;
    gap: 3px;
}

dt {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

dd {
    margin: 0;
    color: var(--text-soft);
}

.stats-band {
    padding: 34px 0;
    border-block: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric {
    padding: 24px;
}

.metric strong {
    display: block;
    color: var(--text);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.metric span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-weight: 750;
}

.two-column,
.contact-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.68fr) minmax(0, 1fr);
    gap: clamp(36px, 7vw, 92px);
    align-items: start;
}

.section-intro,
.contact-copy {
    position: sticky;
    top: calc(var(--header-height) + 36px);
}

.section-intro h2,
.section-heading h2,
.contact-copy h2,
.education-panel h2 {
    font-size: clamp(2.25rem, 5vw, 4.35rem);
}

.section-heading {
    max-width: 780px;
    margin-bottom: 48px;
}

.section-heading p,
.content-stack p,
.contact-copy p,
.education-panel p {
    color: var(--text-soft);
    font-size: 1.03rem;
}

.content-stack > p:first-child {
    margin-top: 0;
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 32px;
}

.focus-grid article,
.process-grid article {
    padding: 24px;
}

.focus-grid span,
.process-grid span {
    color: var(--accent-warm);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.focus-grid h3,
.skill-card h3,
.process-grid h3 {
    margin: 12px 0 8px;
    color: var(--text);
    line-height: 1.15;
}

.focus-grid p,
.skill-card p,
.process-grid p,
.feature-list,
.project-content p {
    color: var(--muted);
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.skill-card {
    min-height: 280px;
    padding: 26px;
}

.skill-card.wide {
    grid-column: span 2;
}

.skill-card h3 {
    max-width: 620px;
    margin-top: 0;
    font-size: clamp(1.45rem, 3vw, 2.35rem);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.projects-heading {
    max-width: 840px;
}

.project-stack {
    display: grid;
    gap: 84px;
}

.project-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.project-showcase.is-reversed .browser-mockup {
    order: 2;
}

.browser-mockup {
    overflow: hidden;
    margin: 0;
    background: #12130f;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.045);
}

.browser-bar span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent-warm);
}

.browser-bar span:nth-child(2) {
    background: var(--accent);
}

.browser-bar span:nth-child(3) {
    background: var(--accent-violet);
}

.browser-bar small {
    min-width: 0;
    margin-left: 8px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browser-screen {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-strong);
}

.browser-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 600ms ease;
}

.project-showcase:hover .browser-mockup {
    border-color: rgba(98, 217, 201, 0.45);
    box-shadow: var(--shadow-md);
}

.project-showcase:hover .browser-screen img {
    transform: scale(1.035);
}

.project-content h3 {
    margin: 18px 0 16px;
    font-size: clamp(2rem, 4.6vw, 4.1rem);
    line-height: 1.03;
    letter-spacing: 0;
}

.project-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.project-topline span,
.project-topline strong {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.38rem 0.64rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.project-topline span {
    border: 1px solid rgba(98, 217, 201, 0.3);
    color: var(--accent);
}

.project-topline strong {
    background: rgba(128, 230, 165, 0.13);
    color: var(--success);
}

.feature-list {
    display: grid;
    gap: 8px;
    margin: 20px 0 0;
}

.feature-list li {
    list-style: none;
    position: relative;
    padding-left: 20px;
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.education-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: center;
    padding: clamp(28px, 5vw, 52px);
}

.education-panel p {
    margin-bottom: 0;
}

.contact-section {
    padding-bottom: 90px;
}

.contact-methods {
    display: grid;
    gap: 12px;
    margin-top: 32px;
}

.contact-methods a {
    display: grid;
    gap: 4px;
    padding: 18px;
}

.contact-methods span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.contact-methods strong {
    color: var(--text-soft);
    overflow-wrap: anywhere;
}

.contact-form {
    display: grid;
    gap: 18px;
    padding: clamp(22px, 4vw, 34px);
}

.form-row {
    display: grid;
    gap: 8px;
}

.form-row label {
    color: var(--text-soft);
    font-weight: 800;
}

.form-row input,
.form-row textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0.92rem 1rem;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.form-row textarea {
    resize: vertical;
    min-height: 150px;
}

.form-row input:focus,
.form-row textarea:focus {
    border-color: rgba(98, 217, 201, 0.72);
    background: rgba(98, 217, 201, 0.055);
    outline: none;
    box-shadow: 0 0 0 4px rgba(98, 217, 201, 0.12);
}

.form-row.is-invalid input,
.form-row.is-invalid textarea {
    border-color: rgba(255, 122, 122, 0.72);
}

.form-error {
    min-height: 18px;
    color: var(--danger);
    font-size: 0.86rem;
}

.form-status {
    min-height: 24px;
    margin: 0;
    color: var(--success);
    font-weight: 800;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 42px 0;
    background: rgba(255, 255, 255, 0.022);
}

.footer-layout {
    display: grid;
    grid-template-columns: 1.3fr auto;
    gap: 28px;
    align-items: center;
}

.footer-layout p {
    margin: 14px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
}

.copyright {
    grid-column: 1 / -1;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 900;
    min-width: 54px;
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(9, 9, 7, 0.82);
    color: var(--text);
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity var(--transition), transform var(--transition), border-color var(--transition);
    backdrop-filter: blur(14px);
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--accent);
}
