/* ===== Fonts (self-hosted, variable) ===== */
/* basic latin */
@font-face { font-family: "Outfit"; src: url("assets/fonts/outfit.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* extended latin: č ć š ž đ etc. (only downloaded when a page uses them) */
@font-face { font-family: "Outfit"; src: url("assets/fonts/outfit-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/fonts/jetbrains-mono-ext.woff2") format("woff2"); font-weight: 100 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ===== Nulldex — monochrome theme ===== */
:root {
  --bg: #000000;
  --bg-alt: #080808;
  --surface: #0e0e0e;
  --surface-2: #151515;
  --text: #f5f5f5;
  --muted: #8c8c8c;
  --faint: #4a4a4a;
  --border: #1f1f1f;
  --border-strong: #333333;
  --invert-bg: #f5f5f5;
  --invert-text: #000000;
  --logo-filter: none;
  --accent: #8b7bff;
  --accent-2: #3dd6f5;
  --accent-grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --line: rgba(255,255,255,.035);
  --radius: 14px;
  --slant: -24deg;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fafafa;
  --bg-alt: #f1f1f1;
  --surface: #ffffff;
  --surface-2: #f4f4f4;
  --text: #0a0a0a;
  --muted: #5f5f5f;
  --faint: #b5b5b5;
  --border: #e3e3e3;
  --border-strong: #cfcfcf;
  --invert-bg: #0a0a0a;
  --invert-text: #ffffff;
  --logo-filter: invert(1);
  --accent: #6a55f5;
  --accent-2: #0bb5d8;
  --line: rgba(0,0,0,.05);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, .btn { font-family: "Outfit", "Inter", sans-serif; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .8rem; letter-spacing: .02em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
::selection { background: var(--text); color: var(--bg); }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; }
.logo-img { height: 22px; width: auto; filter: var(--logo-filter); display: block; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: .95rem; color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text); cursor: pointer; font-size: 1rem;
  transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.menu-btn { display: none; }
.lang-btn { display: grid; place-items: center; width: auto; min-width: 38px; padding: 0 10px; font-size: .75rem; color: var(--muted); }
.lang-btn:hover { color: var(--text); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--invert-bg); color: var(--invert-text) !important;
  padding: 13px 24px; border-radius: 10px; font-weight: 600; border: 1px solid var(--invert-bg);
  cursor: pointer; font-size: 1rem; letter-spacing: -.005em;
  transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px -6px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn-ghost:hover { box-shadow: none; }
.btn-small { padding: 8px 16px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--text) !important; border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--text); }

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 110px 0 90px;
  border-bottom: 1px solid var(--border);
}
/* slanted line texture, same angle as the N */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(66deg, transparent 0 56px, var(--line) 56px 57px);
  /* lines live on the left/top and fade out before reaching the N */
  mask-image: radial-gradient(ellipse 55% 70% at 15% 25%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 55% 70% at 15% 25%, #000 0%, transparent 75%);
}
/* ----- self-typing code editor ----- */
.hero-code {
  position: absolute; inset: 0;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding-top: 168px; /* first code line lines up with the headline */
  /* sits right of the content column; on narrower screens it bleeds off the edge */
  padding-right: max(0px, calc((100vw - 1120px) / 2 - 90px));
  pointer-events: none; user-select: none;
}
.code-window {
  width: min(42vw, 560px);
  margin-right: clamp(-60px, calc((1280px - 100vw) * -0.3), 0px);
  background: transparent;              /* no big grey area -> no banding */
  border: 1px solid var(--border-strong); border-left: 0;   /* frame only on the right */
  border-radius: 0 14px 14px 0;
  overflow: hidden;
  /* fade towards the headline (left) and the bottom */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 45%), linear-gradient(to bottom, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 45%), linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-composite: intersect;
}
.code-bar { display: flex; justify-content: flex-end; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.code-bar span { color: var(--faint); font-size: .72rem; }
.code {
  padding: 18px 20px 22px; height: 340px; overflow: hidden;
  font-size: .86rem; line-height: 1.75; color: var(--muted);
  counter-reset: ln; white-space: pre;
  transition: opacity .5s;
}
.code.fading { opacity: 0; }
.code .line { display: block; }
.code .line::before {
  counter-increment: ln; content: counter(ln);
  display: inline-block; width: 2ch; margin-right: 18px; text-align: right; color: var(--faint); opacity: .6;
}
.tk-c { color: var(--faint); font-style: italic; }
.tk-s { color: var(--accent-2); }
.tk-k { color: var(--accent); }
.tk-f { color: var(--text); }
.tk-n { color: var(--accent-2); }
.caret {
  display: inline-block; width: .55em; height: 1.15em; vertical-align: -0.2em; margin-left: 1px;
  background: var(--accent); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-inner { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; color: var(--muted);
  border: 1px solid var(--border-strong); padding: 6px 14px; border-radius: 999px; margin-bottom: 32px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
h1 {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem); line-height: 1.02;
  letter-spacing: -.045em; font-weight: 600;
}
.slant {
  font-style: italic; font-weight: 500; padding-right: .08em;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 580px; margin: 28px 0 40px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 88px; max-width: 860px; }
.stats li { border-top: 1px solid var(--border-strong); padding-top: 18px; }
.stats .mono { color: var(--faint); display: block; margin-bottom: 8px; }
.stats strong { font-family: "Outfit", sans-serif; font-size: 1.15rem; font-weight: 600; display: block; }
.stats p { color: var(--muted); font-size: .92rem; }

/* ===== SECTIONS ===== */
.section { padding: 110px 0; border-bottom: 1px solid var(--border); }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 56px; }
.section-label {
  display: inline-flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 16px;
}
.section-label::before {
  content: ""; width: 18px; height: 2px; background: var(--accent-grad);
  transform: skewX(var(--slant)); display: inline-block;
}
.section-title { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.04em; font-weight: 600; line-height: 1.1; }
.section-sub { color: var(--muted); font-size: 1.08rem; margin-top: 12px; max-width: 540px; }

/* ===== PROJECTS ===== */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.project:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-4px); }
.project-thumb {
  height: 200px; display: grid; place-items: center; padding: 22px; position: relative;
  background:
    repeating-linear-gradient(66deg, transparent 0 26px, var(--line) 26px 27px),
    var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.mock {
  background: var(--bg); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 12px 14px; width: 86%; font-size: .8rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.mock-head { color: var(--muted); font-size: .7rem; padding-bottom: 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.mock-row { padding: 4px 0; }
.mock-row b { display: inline-block; width: 40px; color: var(--muted); font-weight: 500; font-size: .7rem; }
.mock-foot { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); font-size: .7rem; }
.mock-site { padding: 0; overflow: hidden; }
.mock-bar { display: flex; gap: 5px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.mock-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.mock-hero { padding: 14px 14px 0; font-family: "Outfit", sans-serif; font-weight: 600; font-size: 1.15rem; letter-spacing: -.02em; }
.mock-sub { padding: 0 14px; color: var(--muted); font-size: .72rem; }
.mock-btn { margin: 10px 14px 14px; display: inline-block; background: var(--invert-bg); color: var(--invert-text); padding: 4px 10px; border-radius: 6px; font-weight: 600; font-size: .72rem; }
.game-art { position: relative; width: 100%; height: 100%; }
.pix { position: absolute; width: 26px; height: 26px; border: 2px solid var(--text); transform: skewX(var(--slant)); }
.p1 { left: 18%; top: 28%; background: var(--text); animation: bob 2s infinite ease-in-out; }
.p2 { left: 50%; top: 50%; animation: bob 2.4s infinite ease-in-out reverse; }
.p3 { left: 76%; top: 18%; background: var(--muted); border-color: var(--muted); animation: bob 1.8s infinite ease-in-out; }
.game-label { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); color: var(--text); text-transform: uppercase; letter-spacing: .3em; font-size: .7rem; animation: pulse 1.6s infinite; }
@keyframes bob { 50% { translate: 0 -14px; } }

.project-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-body h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; }
.project-body p { color: var(--muted); font-size: .94rem; flex: 1; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-family: "JetBrains Mono", monospace; font-size: .68rem;
  padding: 3px 9px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--muted);
}
.tag-active { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); background: color-mix(in srgb, var(--accent-2) 8%, transparent); }
.link { font-weight: 500; font-size: .92rem; }
.link[aria-disabled="true"] { color: var(--faint); pointer-events: none; }

/* ===== SERVICES ===== */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card { background: var(--bg-alt); padding: 32px 28px; transition: background .2s; }
.card:hover { background: var(--surface); }
.card-num { color: var(--faint); display: block; margin-bottom: 40px; }
.card h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .93rem; }

/* ===== PROCESS ===== */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { border-top: 1px solid var(--border-strong); padding-top: 22px; position: relative; }
.steps li::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 40px; height: 2px; background: var(--accent-grad);
}
.step-num { color: var(--faint); display: block; margin-bottom: 14px; }
.steps h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 6px; letter-spacing: -.02em; }
.steps p { color: var(--muted); font-size: .93rem; }

/* ===== CONTACT ===== */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-list { list-style: none; display: grid; gap: 14px; margin-top: 36px; }
.contact-list li { display: flex; gap: 18px; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.contact-list .mono { color: var(--faint); min-width: 64px; flex-shrink: 0; }
.contact-list a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--faint); }
.contact-list a:hover { text-decoration-color: var(--text); }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; display: grid; gap: 18px; }
.form label { display: grid; gap: 8px; font-weight: 500; font-size: .88rem; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
}
.form input::placeholder, .form textarea::placeholder { color: var(--faint); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.form .btn { justify-content: center; }
.form-note { font-size: .8rem; color: var(--muted); }
.form-note.form-ok { color: var(--accent-2); }
.form-note.form-error { color: #ff6b6b; }
.form .btn:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ===== FOOTER ===== */
.footer { padding: 32px 0; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer-logo { height: 18px; opacity: .8; }
.footer a:hover { color: var(--text); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .hero-code { opacity: .7; }
}
@media (max-width: 960px) {
  .hero-code { opacity: .3; padding-right: 0; padding-top: 100px; }
  .code-window { width: 70vw; }
  .projects { grid-template-columns: 1fr 1fr; }
  .cards, .steps { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .menu-btn { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .hero { padding: 72px 0 64px; }
  .hero-code { display: none; }
  .stats, .projects, .cards, .steps { grid-template-columns: 1fr; }
  .stats { margin-top: 56px; gap: 18px; }
  .section { padding: 80px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
