/* =========================================================
   style.css — danieltuma.work (shared design language with projects.danieltuma.work)
   ========================================================= */

/* ---- Fonts (self-hosted; CSP font-src 'self') ---- */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url('/fonts/jbmono-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url('/fonts/jbmono-latin-ext.woff2') format('woff2'); 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url('/fonts/jbmono-latin.woff2') format('woff2'); 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; }

/* Name-animation faces: tiny subsets with only the letters of "Daniel Tuma"; variable weight, real italics where the family has them */
@font-face { font-family: 'NF Montserrat'; font-style: italic; font-weight: 100 900; font-display: block; src: url('/fonts/name-montserrat-i-100-900.woff2') format('woff2'); }
@font-face { font-family: 'NF Montserrat'; font-style: normal; font-weight: 100 900; font-display: block; src: url('/fonts/name-montserrat-n-100-900.woff2') format('woff2'); }
@font-face { font-family: 'NF Jost'; font-style: italic; font-weight: 100 900; font-display: block; src: url('/fonts/name-jost-i-100-900.woff2') format('woff2'); }
@font-face { font-family: 'NF Jost'; font-style: normal; font-weight: 100 900; font-display: block; src: url('/fonts/name-jost-n-100-900.woff2') format('woff2'); }
@font-face { font-family: 'NF Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: block; src: url('/fonts/name-grotesk-n-300-700.woff2') format('woff2'); }
@font-face { font-family: 'NF Unbounded'; font-style: normal; font-weight: 200 900; font-display: block; src: url('/fonts/name-unbounded-n-200-900.woff2') format('woff2'); }
@font-face { font-family: 'NF Syne'; font-style: normal; font-weight: 400 800; font-display: block; src: url('/fonts/name-syne-n-400-800.woff2') format('woff2'); }
@font-face { font-family: 'NF Orbitron'; font-style: normal; font-weight: 400 900; font-display: block; src: url('/fonts/name-orbitron-n-400-900.woff2') format('woff2'); }
@font-face { font-family: 'NF JetBrains Mono'; font-style: italic; font-weight: 100 800; font-display: block; src: url('/fonts/name-jbmono-i-100-800.woff2') format('woff2'); }
@font-face { font-family: 'NF JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: block; src: url('/fonts/name-jbmono-n-100-800.woff2') format('woff2'); }
@font-face { font-family: 'NF Source Code Pro'; font-style: italic; font-weight: 200 900; font-display: block; src: url('/fonts/name-sourcecode-i-200-900.woff2') format('woff2'); }
@font-face { font-family: 'NF Source Code Pro'; font-style: normal; font-weight: 200 900; font-display: block; src: url('/fonts/name-sourcecode-n-200-900.woff2') format('woff2'); }
@font-face { font-family: 'NF Space Mono'; font-style: italic; font-weight: 400; font-display: block; src: url('/fonts/name-spacemono-i-400.woff2') format('woff2'); }
@font-face { font-family: 'NF Space Mono'; font-style: italic; font-weight: 700; font-display: block; src: url('/fonts/name-spacemono-i-700.woff2') format('woff2'); }
@font-face { font-family: 'NF Space Mono'; font-style: normal; font-weight: 400; font-display: block; src: url('/fonts/name-spacemono-n-400.woff2') format('woff2'); }
@font-face { font-family: 'NF Space Mono'; font-style: normal; font-weight: 700; font-display: block; src: url('/fonts/name-spacemono-n-700.woff2') format('woff2'); }
@font-face { font-family: 'NF Martian Mono'; font-style: normal; font-weight: 100 800; font-display: block; src: url('/fonts/name-martian-n-100-800.woff2') format('woff2'); }

:root {
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Cascadia Mono', ui-monospace, Consolas, monospace;
  --bg:           #f9f9f8;
  --bg-alt:       #f2f2f0;
  --bg-card:      #ffffff;
  --fg:           #1c1c1a;
  --fg-muted:     #5f5f5c;
  --accent:       #6d28d9;
  --accent-alpha: rgba(109, 40, 217, 0.10);
  --accent-bg:    #ede9fe;
  --border:       #e4e4e1;
  --border-focus: #6d28d9;
  --shadow:       0 2px 12px rgba(0,0,0,0.07);
  --shadow-card:  0 4px 24px rgba(0,0,0,0.08);
  --nav-h: 60px;
  --radius: 6px;
  --transition: 0.22s ease;
}

[data-theme="dark"] {
  --bg:           #111110;
  --bg-alt:       #1a1a18;
  --bg-card:      #1e1e1c;
  --fg:           #edede8;
  --fg-muted:     #9a9a94;
  --accent:       #a78bfa;
  --accent-alpha: rgba(167, 139, 250, 0.13);
  --accent-bg:    #1e1b2e;
  --border:       #2a2a28;
  --border-focus: #a78bfa;
  --shadow:       0 2px 12px rgba(0,0,0,0.28);
  --shadow-card:  0 4px 24px rgba(0,0,0,0.32);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-mono); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.accent { color: var(--accent); }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; padding: 8px 14px; background: var(--accent); color: #fff; border-radius: var(--radius); transition: top 0.15s; }
.skip-link:focus { top: 1rem; }

/* Reveal Animation */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

.section-header { margin-bottom: 2.5rem; }
.section-number { font-size: 0.75rem; color: var(--accent); }
.section-header h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; }
.section-header p { color: var(--fg-muted); font-size: 0.9rem; }

/* NAV */
#nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100; transition: background var(--transition); }
#nav.scrolled { background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; height: 100%; display: flex; align-items: center; gap: 2rem; }
.nav-brand { font-size: 1.15rem; font-weight: 600; }
.nav-links { display: flex; gap: 1.8rem; margin-left: auto; margin-right: 1.5rem; }
.nav-links a { font-size: 0.82rem; color: var(--fg-muted); transition: color var(--transition); }
.nav-links a.active, .nav-links a:hover { color: var(--fg); }
.nav-ext { color: var(--accent) !important; }
.nav-controls { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

/* Language Dropdown */
.lang-switcher-dropdown { position: relative; }
.lang-current { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 10px; height: 34px; color: var(--fg); font-size: 0.8rem; transition: border-color var(--transition); }
.lang-current:hover { border-color: var(--accent); }
.lang-current .chevron { transition: transform var(--transition); }
.lang-switcher-dropdown.open .chevron { transform: rotate(180deg); }

.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); list-style: none; padding: 4px; display: none; flex-direction: column; min-width: 90px; box-shadow: var(--shadow-card); }
.lang-switcher-dropdown.open .lang-menu { display: flex; }
.lang-menu .lang-btn { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 0.8rem; color: var(--fg-muted); border-radius: 4px; transition: 0.22s; }
.lang-menu .lang-btn:hover, .lang-menu .lang-btn.active { background: var(--bg-alt); color: var(--fg); }

.flag-icon { width: 16px; height: 12px; border-radius: 2px; object-fit: cover; }

.theme-toggle { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius); color: var(--fg-muted); transition: color var(--transition), border-color var(--transition); }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
[data-theme="light"] .icon-moon { display: block; } [data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; } [data-theme="dark"] .icon-moon { display: none; }

.hamburger { display: none; flex-direction: column; gap: 4px; width: 28px; }
.hamburger span { display: block; height: 2px; background: var(--fg); transition: 0.22s; }

/* HERO — full-bleed stage: background → name → cut-out of me (name sits BEHIND me) */
#hero { position: relative; height: 100svh; min-height: 520px; max-height: 1200px; background: #020208; overflow: hidden; color: #fff; }
.stage {
  --px: 0; --py: 0; --cut-scale: .66;
  position: absolute; left: 50%; top: 0; height: 100%; aspect-ratio: 1200 / 630;
  transform: translateX(-50%); container-type: inline-size;
}
.layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.layer-bg  { transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -6px), 0) scale(1.04);
  /* only the background fades at the edges (letterbox on very wide screens); the name and the cut-out are never clipped */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); }
.layer-cut { transform: translate3d(calc(var(--px) * 7px), calc(var(--py) * 4px), 0) scale(var(--cut-scale)); transform-origin: 50% 100%; }

/* Name: sized/positioned in container units so it stays registered with the photo; --nfs is set per typeface by JS */
.hero-name {
  position: absolute; left: 0; right: 0; top: 1.2cqw; z-index: 1; text-align: center; color: #fff; text-transform: uppercase;
  font-family: var(--font-mono); font-weight: 800; letter-spacing: 0; white-space: nowrap;
  font-size: calc(19cqw * var(--nfs, 1)); line-height: 18.5cqw;
  transform: translate3d(calc(var(--px) * 3px), calc(var(--ny, 0) * 1em), 0);   /* --ny: per-typeface baseline correction (em), set by name-anim.js */
}
.name-line { display: block; height: 18.5cqw; }
.layer-cut { z-index: 2; }
/* Nav floats over the photo: light-on-dark until the page scrolls */
.has-hero #nav:not(.scrolled) { background: linear-gradient(rgba(2,2,8,.72), transparent); --fg: #edede8; --fg-muted: #cfcfc8; --border: rgba(255,255,255,.28); --accent: #c4b5fd; }
.lang-menu { background: #1a1a18; border-color: #2a2a28; }
.lang-menu .lang-btn { color: #a8a8a2; }
.lang-menu .lang-btn:hover, .lang-menu .lang-btn.active { background: #111110; color: #edede8; }

/* Intro (below the photo) */
.intro { padding: 5rem 0 4rem; border-bottom: 1px solid var(--border); }
.intro-inner > * { max-width: none; }
.intro-inner .hero-desc { max-width: none; font-size: 1.05rem; line-height: 1.75; }  /* same size and full width as the "This is Daniel Tuma" text */
.hero-tag { font-size: 0.75rem; color: var(--accent); margin-bottom: 1rem; }
.hero-desc { max-width: 560px; font-size: 0.95rem; color: var(--fg-muted); margin-bottom: 1.75rem; line-height: 1.8; }
.hero-action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; }

.btn-primary { display: inline-block; padding: 10px 22px; border: 1.5px solid var(--accent); color: var(--accent); border-radius: var(--radius); transition: 0.22s; font-size: 0.9rem; }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-large { padding: 14px 30px; font-size: 1rem; }
.btn-ghost { font-size: 0.9rem; color: var(--fg-muted); border-bottom: 1px solid transparent; transition: 0.22s; }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

/* Scroll hint (white, over the photo) */
.hero-scroll-hint { position: absolute; bottom: 1.75rem; left: 50%; transform: translateX(-50%); z-index: 3; color: #fff; }
.scroll-icon-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 40px; position: relative; }
.scroll-arrow { color: rgba(255,255,255,.75); animation: bounce 2s infinite; transition: opacity 0.3s; }
.scroll-line { width: 1px; height: 0; background: #c4b5fd; transition: height 0.4s ease; }
.scrolled .scroll-arrow { opacity: 0; }
.scrolled .scroll-line { height: 36px; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-6px); } 60% { transform: translateY(-3px); } }

/* PROJECTS (call to action → projects.danieltuma.work) */
.projects-cta { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; position: relative; overflow: hidden; }
.projects-cta::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle, var(--border) 1px, transparent 1px); background-size: 22px 22px; opacity: .5; pointer-events: none; }
.projects-cta > * { position: relative; }
.projects-cta p { max-width: 640px; color: var(--fg-muted); }
.projects-cta-url { font-size: 0.75rem; color: var(--fg-muted); }

/* SKILLS */
.tech-grid { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
.tech-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 100px; padding: 0.6rem 1.2rem; display: flex; align-items: center; gap: 0.6rem; transition: transform 0.22s ease, border-color 0.22s ease; flex: 0 1 auto; cursor: default; }
.tech-item:hover { border-color: var(--accent); transform: scale(1.05); }
.tech-icon { width: 24px; height: 24px; background-color: var(--accent); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.i-linux     { -webkit-mask-image: url('/assets/icons/linux.svg');      mask-image: url('/assets/icons/linux.svg'); }
.i-ollama    { -webkit-mask-image: url('/assets/icons/ollama.svg');     mask-image: url('/assets/icons/ollama.svg'); }
.i-docker    { -webkit-mask-image: url('/assets/icons/docker.svg');     mask-image: url('/assets/icons/docker.svg'); }
.i-python    { -webkit-mask-image: url('/assets/icons/python.svg');     mask-image: url('/assets/icons/python.svg'); }
.i-nodedotjs { -webkit-mask-image: url('/assets/icons/nodedotjs.svg');  mask-image: url('/assets/icons/nodedotjs.svg'); }
.i-github    { -webkit-mask-image: url('/assets/icons/github.svg');     mask-image: url('/assets/icons/github.svg'); }
.tech-svg-custom { width: 24px; height: 24px; }
.tech-svg-custom .svg-bg { fill: var(--accent); }
.tech-svg-custom .svg-fg { fill: var(--bg-card); }
.tech-item span:last-child { font-size: 0.85rem; font-weight: 500; color: var(--fg); }

/* EXPERIENCE timeline */
.timeline { list-style: none; position: relative; margin-left: 0.5rem; padding-left: 2rem; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 2.25rem; }
.timeline-item { position: relative; }
.timeline-item::before { content: ''; position: absolute; left: calc(-2rem - 5px); top: 0.55rem; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-alpha); }
.timeline-date { font-size: 0.75rem; color: var(--accent); }
.timeline-role { font-size: 1.1rem; line-height: 1.3; margin-top: 2px; }
.timeline-company { font-size: 0.85rem; color: var(--fg-muted); }
.timeline-company a:hover { color: var(--accent); }
.timeline-desc { margin-top: 0.5rem; max-width: 640px; font-size: 0.9rem; color: var(--fg-muted); }

/* THIS IS DANIEL TUMA: photo strip (rendered only when src/gallery.json has images) */
.life-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: clamp(11rem, 20vw, 15rem); gap: 1rem; margin-bottom: 3.5rem; }
.life-item { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); }
.life-item:first-child { grid-column: span 2; grid-row: span 2; }
.life-n1 { grid-template-columns: 1fr; } .life-n1 .life-item:first-child { grid-column: auto; grid-row: span 2; }
.life-n2 .life-item:first-child { grid-row: span 2; } .life-n2 { grid-template-columns: 2fr 1fr; }
.life-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.life-item:hover img { transform: scale(1.04); }
.life-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem 1rem 0.85rem; font-size: 0.8rem; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.72), transparent); display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; }
.life-tag { font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; }

/* ABOUT: plain text, full container width */
.about-text { display: flex; flex-direction: column; gap: 1.25rem; font-size: 1.05rem; line-height: 1.75; }
.about-text p { max-width: none; }

/* FOOTER */
#footer { border-top: 1px solid var(--border); padding: 3rem 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; }
.social-links { display: flex; gap: 1rem; justify-content: center; }
.social-links a { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--fg-muted); transition: 0.22s; }
.social-links a:hover { color: var(--accent); border-color: var(--accent); }
.footer-links { font-size: 0.8rem; color: var(--fg-muted); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 0.75rem; color: var(--fg-muted); }

/* 404 */
.notfound { min-height: 100svh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1rem; max-width: 640px; margin: 0 auto; padding: 2rem; }
.notfound h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; }

/* Responsive */
@media (max-width: 900px) {
  .life-grid, .life-n2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 11rem; }
  .life-item:first-child, .life-n2 .life-item:first-child { grid-column: span 2; grid-row: span 2; }
}

@media (max-width: 760px) {
  #hero { height: min(86svh, 780px); }
  /* phone: photo sits lower so the name reads above your head and only overlaps it a little */
  .stage { top: auto; bottom: 0; height: 84%; --cut-scale: .8; }
  .layer-bg { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%); mask-image: linear-gradient(to bottom, transparent, #000 18%); }
  /* the name is sized to the phone, not to the (much wider) stage; the .stage container units don't apply here */
  .hero-name { font-size: calc(21vw * var(--nfs, 1)); line-height: 27vw; top: calc(var(--nav-h) - 4px - 19.05%); }
  .name-line { height: 27vw; }
}

@media (max-width: 680px) {
  .nav-inner { justify-content: space-between; width: 100%; }
  .nav-brand { margin-right: auto; }
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; background: #111110; flex-direction: column; display: none; padding: 2rem; border-bottom: 1px solid #2a2a28; margin: 0; }
  .nav-links a { color: #cfcfc8; }
  .nav-links a:hover, .nav-links a.active { color: #fff; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .section { padding: 72px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .layer-bg { transform: scale(1.04); } .layer-cut { transform: scale(var(--cut-scale)); } .hero-name { transform: none; }
}
