﻿/* ==============================================
   Kalpha_Dev Portfolio — Dev Journal
   Palette: Warm Gray + Amber
   Fonts: Yeon Sung / Gugi / IBM Plex Sans KR / Nanum Gothic Coding
   ============================================== */

:root {
  /* Surface & base — dark warm gray */
  --bg:           #111111;
  --surface:      #161616;
  --text:         #f5f5f4;
  --text-muted:   #a8a29e;
  --text-subtle:  #8f8a84;
  --border:       #292524;
  --border-light: #1c1917;
  --dot:          #1c1917;

  /* Accent — warm amber */
  --accent:       #f59e0b;
  --accent-hover: #eab308;
  --accent-soft:  rgba(245, 158, 11, 0.15);

  /* Semantic */
  --primary:      #f5f5f4;
  --primary-hover:#d6d3d1;

  /* Typography */
  --font-sans:    'IBM Plex Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'Nanum Gothic Coding', 'JetBrains Mono', 'Consolas', monospace;

  /* Glass tokens — dark mode */
  --glass-bg:         rgba(255,255,255,0.04);
  --glass-bg-hover:   rgba(255,255,255,0.08);
  --glass-border:     rgba(255,255,255,0.08);
  --glass-highlight:  rgba(255,255,255,0.12);
  --glass-shadow:     0 1px 2px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.3), 0 12px 32px rgba(0,0,0,0.4);
  --glass-shadow-hover: 0 2px 4px rgba(0,0,0,0.25), 0 8px 24px rgba(0,0,0,0.35), 0 24px 56px rgba(0,0,0,0.5);
  --glass-blur:       28px;
  --glass-blur-light: 16px;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.9rem;
  --text-base: 1.05rem;
  --text-lg:   1.15rem;
  --text-xl:   1.3rem;
  --text-2xl:  1.6rem;
  --text-3xl:  2.1rem;
  --text-4xl:  3.2rem;

  /* Spacing scale — 8dp rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Other */
  --radius: 4px;
  --transition: 200ms ease;
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
::selection { background: var(--accent-soft); color: var(--primary); }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
}

a { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }
h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
p { margin-bottom: 1rem; }
strong { font-weight: 700; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

.sr-only:focus {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  width: auto; height: auto;
  padding: var(--space-2) var(--space-4);
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: normal;
  z-index: 10001;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  border-radius: var(--radius);
}

/* ==============================================
   Progress Bar
   ============================================== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 101;
  transition: width 80ms linear;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

/* ==============================================
   Custom Cursor
   ============================================== */
body { cursor: none; }
a, button, .btn, input, textarea, [role="button"] { cursor: none; }

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  margin-left: -16px; margin-top: -16px;
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, border-color 0.25s ease, background 0.25s ease, opacity 0.25s ease;
  mix-blend-mode: difference;
}

.cursor-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 5px; height: 5px;
  margin-left: -2.5px; margin-top: -2.5px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.15s ease, background 0.25s ease;
}

/* Hover state — cursor expands */
.cursor.hover {
  width: 56px; height: 56px;
  margin-left: -28px; margin-top: -28px;
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.06);
}
.cursor.hover .cursor-dot {
  transform: scale(0.5);
  background: #fff;
}

/* Click state — cursor pulses */
.cursor.click {
  width: 24px; height: 24px;
  margin-left: -12px; margin-top: -12px;
  border-color: rgba(245, 158, 11, 0.9);
}

@media (prefers-reduced-motion: reduce) {
  body, a, button, .btn, input, textarea, [role="button"] { cursor: auto; }
  .cursor, .cursor-glow, .ripple-container { display: none; }
}

/* Touch devices — no custom cursor, no ambient glow */
@media (hover: none), (pointer: coarse) {
  body, a, button, .btn, input, textarea, [role="button"] { cursor: auto; }
  .cursor, .cursor-glow, .ripple-container, .cursor-trail { display: none; }
}

/* Cursor glow — soft ambient light behind cursor */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 280px; height: 280px;
  margin-left: -140px; margin-top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 40%, transparent 70%);
  pointer-events: none;
  z-index: 9998;
  transition: opacity 0.3s ease;
}

/* Click ripple — subtle expanding ring */
.ripple-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.ripple-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: radial-gradient(circle, rgba(245, 158, 11, 0.04) 0%, transparent 70%);
  opacity: 0.6;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

/* Magnetic headings — subtle pull */
.hero-title span,
.section-title,
.about-content h3,
.journey-card h3,
.skill-group h3 {
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==============================================
   Layout Utilities
   ============================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-8); }
.sub-container { max-width: 900px; margin: 0 auto; }
.text-center { text-align: center; }
.mt-4 { margin-top: var(--space-6); }

/* ==============================================
   Buttons
   ============================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: -0.01em;
}

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

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==============================================
   Header
   ============================================== */
.header {
  position: fixed; top: 0; width: 100%;
  background: rgba(17, 17, 17, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

main {
  position: relative;
  z-index: 1;
}
.header-inner {
  display: flex; justify-content: space-between; align-items: center; height: 64px;
}
.logo {
  font-family: 'Gugi', var(--font-sans);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--text);
  position: relative;
}
.logo::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.9s step-end infinite;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.logo:hover { color: var(--accent); }

.nav { display: flex; gap: var(--space-8); }
.nav a {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-muted);
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav a:hover { color: var(--accent); }
.nav a:hover::after { width: 100%; }
.nav a.active {
  color: var(--accent);
}
.nav a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: background var(--transition);
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle:hover span { background: var(--accent); }

/* ==============================================
   Sections
   ============================================== */
section {
  padding: var(--space-32) 0;
  position: relative;
}
section + section {
  border-top: 1px solid var(--border-light);
  position: relative;
}
section + section::before {
  content: '///';
  position: absolute;
  top: -0.65rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-subtle);
  background: var(--bg);
  padding: 0 var(--space-4);
}

.section-title {
  font-family: 'Gugi', var(--font-sans);
  font-size: var(--text-3xl);
  font-weight: 400;
  margin-bottom: var(--space-8);
  letter-spacing: -0.02em;
  position: relative;
}

.section-num {
  position: absolute;
  left: -4.5rem;
  top: -0.35em;
  font-family: 'Yeon Sung', var(--font-sans);
  font-size: 6rem;
  font-weight: 400;
  color: var(--text);
  opacity: 0.04;
  letter-spacing: -0.04em;
  margin-bottom: 0;
  pointer-events: none;
  line-height: 1;
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-12);
  max-width: 640px;
  line-height: 1.8;
}

/* ==============================================
   Hero
   ============================================== */
.hero {
  padding: 12rem 0 var(--space-32);
  background: var(--bg);
  overflow: hidden;
  position: relative;
}
.hero-orb {
  position: absolute;
  top: 50%; left: 50%;
  width: 600px; height: 600px;
  margin-left: -300px;
  margin-top: -350px;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.06) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  opacity: 0;
  transform: scale(0);
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.03) 0%, transparent 70%);
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero-title {
  font-family: 'Yeon Sung', var(--font-sans);
  font-size: var(--text-4xl);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  max-width: 640px;
  perspective: 800px;
}
.hero-title span {
  display: inline-block;
  will-change: transform, opacity;
}
.hero-desc {
  font-size: var(--text-xl);
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: var(--space-8);
  line-height: 1.8;
}
.hero-actions { display: flex; gap: var(--space-3); }

/* ==============================================
   About
   ============================================== */
.about { background: var(--surface); }

.about-content p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  max-width: 660px;
  line-height: 1.85;
}

.about-info {
  margin-top: var(--space-12);
  border-top: 1px solid var(--border);
  padding-top: var(--space-8);
}
.about-info li {
  display: flex;
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.about-info span {
  width: 100px;
  font-weight: 500;
  color: var(--text);
  flex-shrink: 0;
}

/* ==============================================
   Skills — Table style
   ============================================== */
.skills { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur-light)) saturate(110%);
  -webkit-backdrop-filter: blur(var(--glass-blur-light)) saturate(110%);
  box-shadow: var(--glass-shadow);
  counter-reset: skill-num;
}
.skill-group:nth-child(1) {
  grid-column: span 1;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.skill-group:nth-child(2) {
  grid-column: span 2;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.skill-group:nth-child(3) {
  grid-column: span 2;
}
.skill-group:nth-child(4) {
  grid-column: span 1;
}
#skills .skill-group:nth-child(3) {
  grid-column: span 3;
}

.skill-group {
  padding: var(--space-6) var(--space-6) var(--space-8);
  border-right: 1px solid rgba(255,255,255,0.06);
  counter-increment: skill-num;
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.05) 0%,
    rgba(255,255,255,0.03) 100%
  );
  backdrop-filter: blur(var(--glass-blur-light)) saturate(110%);
  -webkit-backdrop-filter: blur(var(--glass-blur-light)) saturate(110%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 1px 3px rgba(0,0,0,0.15),
    0 6px 16px rgba(0,0,0,0.2);
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
}
.skill-group:hover {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0.05) 100%
  );
  border-right-color: rgba(255,255,255,0.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 2px 6px rgba(0,0,0,0.2),
    0 10px 24px rgba(0,0,0,0.3);
}
.skill-group::before {
  content: '0' counter(skill-num);
  position: absolute;
  top: var(--space-6);
  right: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(120, 113, 108, 0.25);
}
.skill-group:nth-child(2),
.skill-group:nth-child(4) { border-right: none; }

.skill-group h3 {
  font-family: 'Gugi', var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.skill-list li {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text);
  margin-bottom: var(--space-3);
  padding-left: var(--space-4);
  position: relative;
}
.skill-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.skill-list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.skill-list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ==============================================
   Projects
   ============================================== */
.projects {
  background: var(--bg);
  background-image: radial-gradient(circle, rgba(245, 158, 11, 0.04) 1px, transparent 1px);
  background-size: 16px 16px;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

/* First card — featured */
.projects-container > .github-project-card:first-child {
  grid-column: span 2;
}

/* Also handle loading/empty/error states */
.projects-container > .github-project-card:first-child ~ .github-loading,
.projects-container > .github-project-card:first-child ~ .github-empty,
.projects-container > .github-project-card:first-child ~ .github-error {
  grid-column: span 3;
}

.github-project-card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.07) 0%,
    rgba(255,255,255,0.04) 45%,
    rgba(255,255,255,0.05) 100%
  );
  backdrop-filter: blur(var(--glass-blur)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(130%);
  transform-style: preserve-3d;
  perspective: 1000px;
  z-index: 1;
  will-change: transform;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06),
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(255,255,255,0.02),
    var(--glass-shadow);
  transition: box-shadow 0.5s ease, border-color 0.4s ease, background 0.4s ease;
}

.github-project-card:hover {
  border-color: rgba(255,255,255,0.12);
  z-index: 2;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.11) 0%,
    rgba(255,255,255,0.06) 45%,
    rgba(255,255,255,0.08) 100%
  );
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.10),
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -1px 0 rgba(255,255,255,0.03),
    var(--glass-shadow-hover);
}

/* Edge rim — fresnel highlight that follows light angle */
.github-project-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(
    var(--edge-angle, 135deg),
    rgba(255,255,255,0.25) 0%,
    rgba(255,255,255,0.06) 30%,
    rgba(255,255,255,0) 55%,
    rgba(255,255,255,0.12) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
  transition: opacity 0.4s ease;
}
.github-project-card:hover::before {
  opacity: 1;
}

.github-project-card h3 {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-3);
  color: var(--accent);
}

.github-project-card > p:not(.repo-meta) {
  font-size: var(--text-sm);
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: var(--space-6);
  line-height: 1.65;
}

.repo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: 0;
  background: none;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 3px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.skill-tag:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.repo-meta {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-bottom: var(--space-4);
}

.btns { display: flex; gap: var(--space-2); }
.btns .btn {
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  flex: 1;
  font-weight: 400;
}
.btns .btn:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
}

/* Loading / error / empty states */
.github-loading,
.github-empty,
.github-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-subtle);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ==============================================
   Contact
   ============================================== */
.contact {
  background: var(--bg);
}

.contact p {
  color: var(--text-muted);
  font-size: var(--text-lg);
  line-height: 1.85;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ==============================================
   Footer
   ============================================== */
.footer {
  background: var(--surface);
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin: 0;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.live-clock {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.04em;
}

.footer-links a {
  color: var(--text-subtle);
  font-size: var(--text-lg);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }

.build-info {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-subtle);
}

/* ==============================================
   Demo — Browser Frame
   ============================================== */
.demo {
  background: var(--surface);
}

.browser-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.browser-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.traffic-lights {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.light-red    { background: #ef4444; border-color: #dc2626; }
.light-yellow { background: #f59e0b; border-color: #d97706; }
.light-green  { background: #22c55e; border-color: #16a34a; }

.address-bar {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: var(--space-1) var(--space-4);
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.demo-open {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}
.demo-open:hover { color: var(--accent); }

.browser-content {
  position: relative;
  width: 100%;
  padding-top: 62.5%;
}

.browser-content iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: var(--surface);
}

.iframe-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  border: 0;
  background: rgba(17, 17, 17, 0.35);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.iframe-shield:hover {
  background: rgba(17, 17, 17, 0.15);
  color: var(--accent);
}

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

.iframe-shield.is-off { display: none; }

/* ==============================================
   Journey — Timeline
   ============================================== */
.journey {
  background: var(--bg);
}

.journey-timeline {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding-left: var(--space-8);
}

.journey-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: var(--space-2);
  bottom: var(--space-2);
  width: 2px;
  background: var(--border);
  transform-origin: top center;
  transform: scaleY(var(--line-scale, 1));
}

.journey-item {
  position: relative;
  padding-bottom: var(--space-10);
}

.journey-item:last-child {
  padding-bottom: 0;
}

.journey-dot {
  position: absolute;
  left: calc(-1 * var(--space-8) - 5px);
  top: var(--space-2);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  z-index: 1;
  transition: background var(--transition), border-color var(--transition);
}

.journey-item.active .journey-dot {
  background: var(--accent);
  border-color: var(--accent);
}

.journey-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.journey-date {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-subtle);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.journey-card h3 {
  font-family: 'Gugi', var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.journey-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0;
}

/* FOUC prevention — body hidden until GSAP initializes */
body { opacity: 0; }
body.gsap-ready { opacity: 1; }

/* ==============================================
   Responsive
   ============================================== */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skill-group:nth-child(2) { border-right: none; }
  #skills .skill-group:nth-child(3) { grid-column: span 2; }
  .projects-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .projects-container > .github-project-card:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  :root {
    --text-4xl: 2.25rem;
    --text-3xl: 1.65rem;
  }

  .hero { padding: 8rem 0 var(--space-20); }
  .hero-orb { width: 300px; height: 300px; margin-left: -150px; margin-top: -180px; }
  .hero::before { width: 300px; height: 300px; right: -20%; }
  .header-inner { justify-content: space-between; }
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--space-2) var(--space-6) var(--space-4);
    background: rgba(17, 17, 17, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .nav.nav--open { display: flex; }
  .nav a { padding: var(--space-3) 0; border-bottom: 1px solid var(--border-light); }
  .nav a:last-child { border-bottom: none; }
  .nav a::after { display: none; }
  section { padding: var(--space-20) 0; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .about-info li { flex-direction: column; gap: var(--space-1); }
  .about-info span { width: auto; }

  .skills-grid {
    grid-template-columns: 1fr;
    border: none;
    border-radius: 0;
    gap: var(--space-3);
    background: transparent;
  }
  .skill-group {
    grid-column: span 1 !important;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: var(--space-4) var(--space-6);
    background: linear-gradient(
      180deg,
      rgba(255,255,255,0.05) 0%,
      rgba(255,255,255,0.03) 100%
    );
    backdrop-filter: blur(var(--glass-blur-light)) saturate(110%);
    -webkit-backdrop-filter: blur(var(--glass-blur-light)) saturate(110%);
    border-right: 1px solid rgba(255,255,255,0.06);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.05),
      0 1px 3px rgba(0,0,0,0.15),
      0 6px 16px rgba(0,0,0,0.2);
  }
  .skill-group::before { display: none; }
  .section-num {
    position: static;
    display: block;
    font-family: 'Gugi', var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--accent);
    opacity: 1;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-2);
  }

  .projects-container {
    grid-template-columns: 1fr;
  }
  .projects-container > .github-project-card:first-child {
    grid-column: span 1;
  }

  .container { padding: 0 var(--space-6); }

  .footer-inner { flex-direction: column; gap: var(--space-4); text-align: center; }
  .footer-right { flex-direction: column; gap: var(--space-3); }

  .browser-toolbar { padding: var(--space-2) var(--space-3); }
  .traffic-lights { gap: 5px; }
  .light { width: 9px; height: 9px; }
  .address-bar { font-size: 0.65rem; padding: 2px var(--space-2); }
  .demo-open { font-size: 0.65rem; }

  .journey-timeline { padding-left: var(--space-6); }
  .journey-dot { left: calc(-1 * var(--space-6) - 5px); }
}

@media (max-width: 480px) {
  :root {
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
  }

  .hero { padding: 6rem 0 var(--space-16); }
  .hero-orb { width: 240px; height: 240px; margin-left: -120px; margin-top: -150px; }
  .hero::before { width: 200px; height: 200px; right: -30%; }
  .container { padding: 0 var(--space-4); }
}
