/* ==========================================================================
   tanuv.info — design tokens
   Light mode: paper spec sheet. Dark mode: the blueprint itself.
   ========================================================================== */

:root {
    --bg: #FAFAF8;
    --ink: #14171A;
    --muted: #5B6168;
    --line: #E3E3DF;
    --accent: #2F5DE0;
    --accent-soft: #EAF0FF;
    --surface: #FFFFFF;

    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --font-sans: 'Inter', -apple-system, sans-serif;

    --header-h: 60px;
    --margin: clamp(20px, 5vw, 96px);
    --radius: 3px;
}

html.dark {
    --bg: #0A2452;
    --ink: #EAF2FF;
    --muted: #93AEDD;
    --line: rgba(234, 242, 255, 0.16);
    --accent: #7FB2FF;
    --accent-soft: rgba(127, 178, 255, 0.12);
    --surface: #0E2C63;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.35s ease, color 0.35s ease;
}

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

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

button {
    font-family: inherit;
}

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

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

/* ---------------------------------- registration marks ---------------------------------- */

.reg {
    position: fixed;
    width: 18px;
    height: 18px;
    z-index: 60;
    pointer-events: none;
    opacity: 0.55;
}

.reg::before,
.reg::after {
    content: '';
    position: absolute;
    background: var(--muted);
}

.reg::before {
    width: 100%;
    height: 1px;
    top: 50%;
}

.reg::after {
    width: 1px;
    height: 100%;
    left: 50%;
}

.reg-tl {
    top: 14px;
    left: 14px;
}

.reg-tr {
    top: 14px;
    right: 14px;
}

.reg-bl {
    bottom: 14px;
    left: 14px;
}

.reg-br {
    bottom: 14px;
    right: 14px;
}

@media (max-width: 640px) {
    .reg {
        display: none;
    }
}

/* ---------------------------------- header ---------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    height: var(--header-h);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--margin);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-mark {
    color: var(--accent);
    font-size: 0.7rem;
}

.dim {
    color: var(--muted);
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 26px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-desktop a {
    color: var(--muted);
    position: relative;
    transition: color 0.2s ease;
}

.nav-desktop a:hover {
    color: var(--ink);
}

.nav-cta {
    color: var(--accent) !important;
    border: 1px solid var(--accent);
    padding: 6px 13px;
    border-radius: var(--radius);
}

.nav-cta:hover {
    background: var(--accent-soft);
}

.route-indicator {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
    text-align: right;
    padding: 2px var(--margin) 3px;
    border-bottom: 1px solid var(--line);
    letter-spacing: 0.02em;
    opacity: 0.75;
}

.mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

@media (min-width: 768px) {
    .mobile-toggle {
        display: none;
    }
}

.mobile-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.mobile-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

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

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    z-index: 45;
    flex-direction: column;
    font-family: var(--font-mono);
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    padding: 18px var(--margin);
    border-top: 1px solid var(--line);
    color: var(--ink);
}

/* ---------------------------------- hero ---------------------------------- */

.hero {
    min-height: 100vh;
    padding: calc(var(--header-h) + 45px) var(--margin) 80px;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-content: center;
    position: relative;
}

@media (min-width: 900px) {
    .hero {
        grid-template-columns: 1.4fr 0.6fr;
        align-items: end;
        min-height: 92vh;
    }
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 18px;
}

.hero-title {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(2.6rem, 7vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
}

.hero-cursor {
    color: var(--muted);
    font-size: 0.42em;
    font-weight: 500;
    display: inline-block;
    margin-top: 12px;
}

.caret {
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

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

.hero-copy {
    max-width: 46ch;
    font-size: 1.1rem;
    color: var(--muted);
    margin: 0 0 32px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 13px 26px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--ink);
    color: var(--bg);
}

html.dark .btn-primary {
    background: var(--accent);
    color: #08163A;
}

.btn-primary:hover {
    opacity: 0.88;
}

.btn-ghost {
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.dataplate {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: var(--surface);
    align-self: end;
}

.dataplate-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    color: var(--muted);
}

.dataplate-row:last-child {
    border-bottom: none;
}

.dataplate-row span:first-child {
    color: var(--muted);
}

.dataplate-row span:last-child {
    color: var(--ink);
}

.status-dot::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FF0000;
    margin-right: 6px;
}

.scroll-cue {
    position: absolute;
    bottom: 28px;
    left: var(--margin);
    display: none;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    animation: floaty 2.4s ease-in-out infinite;
}

@media (min-width: 900px) {
    .scroll-cue {
        display: flex;
    }
}

@keyframes floaty {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

/* ---------------------------------- sections ---------------------------------- */

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 110px var(--margin);
    border-top: 1px solid var(--line);
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.04em;
    margin: 0 0 12px;
}

.section-title {
    font-family: var(--font-mono);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 48px;
    letter-spacing: -0.01em;
}

/* about */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: 0.75fr 1.25fr;
        align-items: start;
    }
}

.about-photo-wrap {
    position: relative;
    max-width: 340px;
}

.about-photo {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    filter: grayscale(0.15);
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-tick {
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--accent);
}

.photo-tick-tl {
    top: -7px;
    left: -7px;
    border-top: 2px solid;
    border-left: 2px solid;
}

.photo-tick-br {
    bottom: -7px;
    right: -7px;
    border-bottom: 2px solid;
    border-right: 2px solid;
}

.about-copy p {
    color: var(--muted);
    margin: 0 0 20px;
    max-width: 62ch;
}

.about-copy strong {
    color: var(--ink);
    font-weight: 600;
}

.resume-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    border-bottom: 1px solid var(--accent);
    padding-bottom: 2px;
    margin-top: 8px;
}

/* projects */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 700px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.projects-loading,
.projects-empty {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted);
}

.project-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background: var(--surface);
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.project-name {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--ink);
}

.project-desc {
    color: var(--muted);
    font-size: 0.9rem;
    flex: 1;
    margin: 0;
}

.project-meta {
    display: flex;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    padding-top: 8px;
    border-top: 1px dashed var(--line);
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
}

/* skills spec sheet */
.spec-sheet {
    border-top: 1px solid var(--line);
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

@media (min-width: 700px) {
    .spec-row {
        grid-template-columns: 200px 1fr;
        gap: 24px;
    }
}

.spec-label {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent);
    font-size: 0.9rem;
}

.spec-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
}

.spec-items span {
    font-size: 0.95rem;
    color: var(--muted);
    position: relative;
    padding-left: 14px;
}

.spec-items span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    background: var(--ink);
    border-radius: 50%;
}

/* contact */
.contact-form {
    max-width: 640px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.field label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field input,
.field textarea {
    font-family: var(--font-sans);
    font-size: 1rem;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    resize: vertical;
    transition: border-color 0.2s ease;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--accent);
}

.form-status {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    min-height: 1.2em;
    margin-top: 14px;
}

/* ---------------------------------- footer ---------------------------------- */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 40px var(--margin) 60px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

.footer-social {
    display: flex;
    gap: 20px;
}

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

/* ---------------------------------- theme toggle ---------------------------------- */

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

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
}

.icon-moon {
    display: none;
}

html.dark .icon-sun {
    display: none;
}

html.dark .icon-moon {
    display: block;
}

/* ---------------------------------- reveal on scroll ---------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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