/* ============================================================================
   yugantar.dev — design system
   Modern dev / techy · OLED-dark · Space Grotesk + DM Sans + JetBrains Mono
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* color */
  --bg:        #0A0A0B;
  --bg-soft:   #0F0F11;
  --surface:   #18181B;
  --surface-2: #1F1F23;
  --border:    #27272A;
  --border-lit:#3F3F46;
  --text:      #E4E4E7;
  --muted:     #A1A1AA;
  --faint:     #71717A;
  --accent:    #2563EB;
  --accent-2:  #22D3EE;
  --accent-glow: rgba(34, 211, 238, 0.15);

  /* type */
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* scale */
  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle grid + glow backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(700px circle at 80% -5%, var(--accent-glow), transparent 60%),
    radial-gradient(600px circle at 0% 10%, rgba(37,99,235,0.10), transparent 55%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 30%, transparent 80%);
  pointer-events: none;
}

a { color: var(--accent-2); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--text); }

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

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* mono label / eyebrow */
.mono { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.02em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent-2); display: inline-block; }

/* skip link */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10,10,11,0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--font-mono); font-weight: 500; font-size: 1.02rem;
  color: var(--text); letter-spacing: -0.01em;
}
.brand b { color: var(--text); font-weight: 700; }
.brand span { color: var(--accent-2); }
.brand .caret { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-mono); font-size: 0.86rem; color: var(--muted);
  padding: 8px 14px; border-radius: 8px; transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::before { content: "/ "; color: var(--accent-2); }

.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 40px; height: 38px; cursor: pointer; color: var(--text); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: currentColor;
  position: relative; margin: 0 auto; transition: transform .25s var(--ease); }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 8px; border-bottom: 1px solid var(--border); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.88rem;
  padding: 12px 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border-lit); color: var(--text); background: var(--surface);
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { border-color: var(--accent-2); color: var(--text); transform: translateY(-2px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.btn svg { width: 16px; height: 16px; }

/* ---------- sections ---------- */
section { padding: 96px 0; }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 14px 0 10px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- hero ---------- */
.hero { padding: 120px 0 88px; }
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02; margin-bottom: 22px; letter-spacing: -0.035em;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 620px; margin: 0 0 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 36px; }
.chip {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 13px;
}
.chip b { color: var(--accent-2); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
  position: relative; overflow: hidden;
}
.card:hover { border-color: var(--border-lit); transform: translateY(-4px); background: var(--surface-2); }
.card h3 { font-size: 1.22rem; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0 0 14px; font-size: 0.97rem; }
a.card { color: inherit; display: block; }
a.card:hover h3 { color: var(--accent-2); }

.card .idx { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); margin-bottom: 16px; display: block; }
.card-link { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent-2); display: inline-flex; gap: 6px; align-items: center; }

/* tag pills */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 3px 9px;
}

/* ---------- timeline (work) ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -28px; top: 6px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); transform: translateX(1px);
}
.tl-item.now::before { background: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-glow); }
.tl-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint); }
.tl-role { font-family: var(--font-head); font-size: 1.16rem; font-weight: 600; margin: 4px 0 2px; }
.tl-where { color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; }
.tl-where .at { color: var(--accent-2); }

/* ---------- travel ---------- */
.travel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .travel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .travel-grid { grid-template-columns: 1fr; } }
.place {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color .25s var(--ease), transform .25s var(--ease);
  position: relative;
}
.place:hover { border-color: var(--border-lit); transform: translateY(-4px); }
.place .flag { font-size: 1.9rem; line-height: 1; margin-bottom: 14px; }
.place h3 { font-size: 1.2rem; margin-bottom: 4px; }
.place .when { font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent-2); }
.place p { color: var(--muted); font-size: 0.92rem; margin: 10px 0 0; }
.place.home { border-color: var(--accent); background: linear-gradient(180deg, rgba(37,99,235,0.08), var(--surface)); }

.stat-row { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 44px; }
.stat .n { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat .n span { color: var(--accent-2); }
.stat .l { font-family: var(--font-mono); font-size: 0.76rem; color: var(--faint); margin-top: 6px; }

/* ---------- journey timeline (travel) ---------- */
.journey { position: relative; margin: 8px 0; padding: 8px 0; }
/* the vertical spine, centered on desktop */
.journey::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(180deg, transparent, var(--border-lit) 6%, var(--border-lit) 94%, transparent);
}
.journey::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-top: 10px solid var(--border-lit);
}

.stop { position: relative; width: 50%; padding: 0 44px 56px 0; }
.stop:last-child { padding-bottom: 8px; }
.stop:nth-child(even) { margin-left: 50%; padding: 0 0 56px 44px; }

/* node on the spine */
.stop .node {
  position: absolute; top: 6px; right: -7px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); z-index: 2;
  transition: box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
.stop:nth-child(even) .node { right: auto; left: -7px; }
.stop.in .node { background: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 0 5px var(--accent-glow); }
.stop.now .node { background: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 0 6px var(--accent-glow); }

/* connector tick from node to card */
.stop .card { position: relative; }
.stop .card::before {
  content: ""; position: absolute; top: 11px; right: -30px; width: 30px; height: 2px;
  background: var(--border-lit);
}
.stop:nth-child(even) .card::before { right: auto; left: -30px; }

/* year flag on the spine */
.stop .year {
  position: absolute; top: 2px; right: -44px; transform: translateX(100%);
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; color: var(--accent);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 7px; padding: 3px 10px;
  white-space: nowrap; z-index: 2;
}
.stop:nth-child(even) .year { right: auto; left: -44px; transform: translateX(-100%); }

/* stop card content */
.stop .card { padding: 22px 24px; }
.stop .stop-flag { font-size: 1.7rem; line-height: 1; margin-bottom: 10px; display: block; }
.stop .card h3 { font-size: 1.18rem; margin-bottom: 4px; }
.stop .stop-meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent-2); }
.stop .card p { color: var(--muted); font-size: 0.93rem; margin: 10px 0 0; }
.stop .stop-tags { margin-top: 14px; }

/* reveal: slide in from the card's side */
.stop { opacity: 0; transform: translateX(28px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.stop:nth-child(even) { transform: translateX(-28px); }
.stop.in { opacity: 1; transform: none; }

/* mobile: single rail on the left */
@media (max-width: 720px) {
  .journey::before { left: 7px; transform: none; }
  .journey::after { left: 7px; transform: translateX(-50%); }
  .stop, .stop:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 44px 36px; }
  .stop .node, .stop:nth-child(even) .node { left: 1px; right: auto; }
  .stop .card::before, .stop:nth-child(even) .card::before { left: -22px; right: auto; width: 22px; }
  .stop .year, .stop:nth-child(even) .year {
    position: static; transform: none; display: inline-block; margin-bottom: 10px;
  }
  .stop, .stop:nth-child(even) { transform: translateX(20px); }
  .stop.in { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stop, .stop:nth-child(even) { opacity: 1; transform: none; transition: none; }
}

/* ---------- life ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.feature .body { padding: 38px; }
.feature .visual {
  background: linear-gradient(135deg, var(--surface-2), var(--bg-soft));
  display: grid; place-items: center; min-height: 220px; color: var(--faint);
  border-left: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.8rem;
}
@media (max-width: 700px) { .feature { grid-template-columns: 1fr; } .feature .visual { border-left: 0; border-top: 1px solid var(--border); } }

/* ---------- contact ---------- */
.contact-card {
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  padding: 22px 24px; display: flex; align-items: center; gap: 16px;
  transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
.contact-card:hover { border-color: var(--border-lit); transform: translateY(-3px); background: var(--surface-2); }
.contact-card .ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 10px; color: var(--accent-2); }
.contact-card .ico svg { width: 20px; height: 20px; }
.contact-card .meta b { display: block; color: var(--text); font-family: var(--font-head); font-size: 1.05rem; }
.contact-card .meta span { color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.foot .copy { font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint); }
.foot .copy span { color: var(--accent-2); }
.foot-links { display: flex; gap: 18px; }
.foot-links a { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.foot-links a:hover { color: var(--text); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover, .place:hover, .btn:hover, .contact-card:hover { transform: none; }
}

/* utility */
.lede { font-size: 1.18rem; color: var(--muted); max-width: 660px; }
.center { text-align: center; }
.mt-s { margin-top: 14px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 48px; }
