/* ============================================
   Portfolio — styles.css
   Dark theme · CSS variables · Responsive
   ============================================ */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- VARIABLES ---------- */
:root {
  --bg:          #0a0a0b;
  --surface:     #18181b;
  --surface-2:   #1f1f23;
  --border:      #27272a;
  --text:        #fafafa;
  --text-muted:  #a1a1aa;
  --text-dim:    #71717a;
  --accent:      #a78bfa;
  --accent-hover:#c4b5fd;
  --accent-dim:  #6d28d9;
  --radius:      12px;
  --radius-sm:   8px;
  --max-width:   1100px;
  --nav-height:  64px;
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- UTILITY ---------- */
.container { width: 90%; max-width: var(--max-width); margin: 0 auto; }

.section {
  padding:50px 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 48px;
  font-size: 1.05rem;
}

/* ---------- NAV ---------- */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%;
  height: var(--nav-height);
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: border-color 0.3s var(--ease);
}

.navbar.scrolled { border-color: var(--border); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}

.logo {
  font-weight: 700; font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo:hover { color: var(--accent); }

.nav-links { display: flex; gap: 32px; }

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  position: relative;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  position: relative;
  padding: 120px 0 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 30% 40%, rgba(167,139,250,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 400px 600px at 70% 60%, rgba(109,40,217,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; text-align: center; }

.hero-sup {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* ---------- HERO AVATAR ---------- */
.hero-avatar-wrap {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.hero-avatar {
  width: clamp(100px, 15vw, 140px);
  height: clamp(100px, 15vw, 140px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface-2);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.hero-avatar:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; bottom: 18px;
  color: var(--text-dim);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent); color: #0a0a0b;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(167,139,250,0.25);
}

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

.btn-ghost {
  background: transparent; color: var(--text-muted);
  border-color: transparent;
  padding-left: 0; padding-right: 0;
}
.btn-ghost:hover { color: var(--accent); }

.btn-sm { padding: 8px 16px; font-size: 0.825rem; }

.disabled {
  opacity: 0.35; pointer-events: none;
  filter: grayscale(1);
}

/* ---------- CASE STUDY ---------- */
.case-study { background: var(--surface);}

.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.case-content .chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 16px;
}

.case-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 6px;
}

.case-subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 1rem;
}

.case-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
  line-height: 1.75;
}

/* Metrics */
.case-metrics {
  display: flex; gap: 32px;
  margin-bottom: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.metric-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Tech list */
.case-tech-list { margin-bottom: 28px; }

.case-tech-list h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.case-tech-list ul { display: flex; flex-direction: column; gap: 10px; }

.case-tech-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.case-tech-list li::before {
  content: '▹';
  position: absolute; left: 0;
  color: var(--accent);
}

.case-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* Code card */
.case-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.case-card-header {
  padding: 12px 20px;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}

.case-code {
  padding: 20px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.65;
}

.case-code code {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  color: var(--text-muted);
}

.cm-key    { color: #ff79c6; }
.cm-fn     { color: #50fa7b; }
.cm-comment { color: #6272a4; font-style: italic; }

/* ---------- GAME MEDIA (case study icon + thumbnails) ---------- */

/* Icon (square, 512x512 source) sits as a large avatar on the left.
   Thumbnails (16:9 source) form their own row/grid beside it — each
   keeps its native aspect ratio, so nothing gets cropped or squeezed. */
.game-media {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.game-icon-wrap {
  flex: 0 0 auto;
}

.game-icon {
  width: 128px;
  height: 128px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: zoom-in;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.game-thumbs {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.game-thumb-sm {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: zoom-in;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.game-icon:hover,
.game-thumb-sm:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

/* ---------- LIGHTBOX ---------- */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center; justify-content: center;
  z-index: 2000;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox-overlay.open { display: flex; }

.lightbox-img {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.lightbox-close:hover { color: var(--accent); }

/* ---------- PROTOTYPES GRID ---------- */
.proto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.proto-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.proto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.proto-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}

.proto-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--surface-2), var(--border));
}

.proto-body { padding: 20px; }

.proto-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.proto-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.proto-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(167,139,250,0.1);
  color: var(--accent);
  border: 1px solid rgba(167,139,250,0.2);
  letter-spacing: 0.02em;
}

.tag-lg { padding: 6px 14px; font-size: 0.8rem; }

.proto-links { display: flex; gap: 12px; }

/* ---------- INTERESTS ---------- */
.outlook-interests .interest-block {
  margin-bottom: 2rem; /* creates space between the blocks */
}

.outlook-interests h4 {
  margin-bottom: 0.5rem; /* creates space between the header and its paragraph */
  font-size: 1.2rem;
}

.outlook-interests p {
  margin: 0;
  line-height: 1.6;
}

.outlook-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .outlook-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* breathing room between interest items */
.interest-block {
  margin-bottom: 2rem;
}

.interest-block h4 {
  margin-bottom: 0.5rem;
}

/* ---------- SKILLS ---------- */
.skills { background: var(--surface);}

.skill-tiers { display: flex; flex-direction: column; gap: 28px; }

.tier {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.tier-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}

.tier-icon { font-size: 1.2rem; }

.tier-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.tier-header.core    { color: var(--accent); }
.tier-header.working { color: #60a5fa; }
.tier-header.learning{ color: #34d399; }

.tier-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tier-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 80px 0 40px;
  text-align: center;
}

.footer-heading {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-desc {
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.7;
}

.footer-links {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

/* ---------- WIP TEMPLATE CARDS ---------- */
.wip {
  display: none; /* hidden by default */
}

.wip.visible {
  display: block;
}

.wip-toggle-btn {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
  .case-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .case-visual { order: -1; }
}

/* Mobile */
@media (max-width: 650px) {
  .section { padding: 60px 0; }

  .nav-links {
    position: fixed; top: var(--nav-height); left: 0; width: 100%;
    flex-direction: column;
    gap: 0;
    background: rgba(10,10,11,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links a {
    display: block;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle { display: flex; }

  .hero-name { font-size: clamp(2.2rem, 10vw, 3.5rem); }

  .case-metrics {
    flex-direction: column;
    gap: 16px;
  }

  .game-media {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .game-icon {
    width: 96px;
    height: 96px;
  }

  .game-thumbs {
    width: 100%;
  }

  .proto-grid {
    grid-template-columns: 1fr;
  }

  .tier { padding: 20px; }
}

/* Small phones */
@media (max-width: 380px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}