:root {
    --bg: #ffffff;
    --surface: #f5f5f5;
    --border: #e8e8e8;
    --border-hover: #bbb;
    --text: #0a0a0a;
    --muted: #aaa;
    --muted-light: #666;
    --font-display: 'Syne', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Syne', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
  }
  
  *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
  a { color: inherit; text-decoration: none; }
  button { font-family: inherit; }
  
  ::-webkit-scrollbar { width: 3px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--text); }
  
  /* ── NAV ─────────────────────────────────────── */
  nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 1rem 6vw; background: rgba(255,255,255,0.93); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
  .logo { font-family: var(--font-display); font-size: 1rem; font-weight: 800; letter-spacing: 3px; }
  nav ul { display: flex; gap: 2.5rem; list-style: none; }
  nav ul a { font-size: 0.72rem; font-weight: 500; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; transition: color 0.2s; position: relative; }
  nav ul a::after { content: ''; position: absolute; bottom: -3px; left: 0; width: 0; height: 1px; background: var(--text); transition: width 0.25s; }
  nav ul a:hover, nav ul a.active { color: var(--text); }
  nav ul a:hover::after, nav ul a.active::after { width: 100%; }
  .nav-toggle { display: none; width: 32px; height: 24px; border: none; background: transparent; cursor: pointer; }
  .nav-toggle span { display: block; width: 100%; height: 1px; background: var(--text); margin: 7px 0; transition: transform 0.25s, opacity 0.25s; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { transform: translateY(-8px) rotate(-45deg); }
  
  /* ── BUTTONS ─────────────────────────────────── */
  .btn { display: inline-block; font-family: var(--font-body); font-size: 0.76rem; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; padding: 0.8rem 1.8rem; border-radius: 2px; transition: all 0.2s; }
  .btn-primary { background: var(--text); color: var(--bg); }
  .btn-primary:hover { background: #333; transform: translateY(-2px); }
  .btn-ghost { border: 1px solid var(--border-hover); color: var(--muted-light); }
  .btn-ghost:hover { border-color: var(--text); color: var(--text); transform: translateY(-2px); }
  
  /* ── HERO ────────────────────────────────────── */
  #hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 5rem 6vw 3rem; border-bottom: 1px solid var(--border); position: relative; }
  .hero-inner { display: grid; grid-template-columns: 1fr 480px; gap: 5rem; align-items: center; width: 100%; max-width: 1300px; margin: 0 auto; }
  .hero-photo { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center top; border-radius: 4px; filter: grayscale(10%); display: block; }
  #hero h1 { font-family: var(--font-display); font-size: clamp(3.5rem, 8vw, 7.5rem); font-weight: 800; line-height: 0.92; letter-spacing: -3px; margin-bottom: 1.5rem; }
  .line { display: block; opacity: 0; transform: translateY(24px); animation: slideUp 0.7s cubic-bezier(0.16,1,0.3,1) forwards; }
  .line:nth-child(1) { animation-delay: 0.05s; }
  .line.dim { animation-delay: 0.16s; color: var(--muted); }
  .line.offset { padding-left: clamp(1.5rem, 4vw, 4rem); }
  @keyframes slideUp { to { opacity: 1; transform: translateY(0); } }
  .subtitle { font-size: 0.95rem; color: var(--muted-light); margin-bottom: 2rem; line-height: 1.8; max-width: 440px; font-weight: 300; opacity: 0; animation: slideUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.28s forwards; }
  .hero-actions { display: flex; gap: 0.75rem; opacity: 0; animation: slideUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.4s forwards; }
  .hero-scroll { position: absolute; bottom: 2rem; left: 6vw; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
  .hero-scroll span { font-size: 0.55rem; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); writing-mode: vertical-lr; }
  .scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--text), transparent); animation: scrollAnim 2.2s ease infinite; }
  @keyframes scrollAnim {
    0%   { transform: scaleY(0); transform-origin: top; }
    50%  { transform: scaleY(1); transform-origin: top; }
    51%  { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
  }
  
  /* ── SECTIONS ────────────────────────────────── */
  section:not(#hero) { max-width: 1300px; margin: 0 auto; padding: 4rem 6vw; border-bottom: 1px solid var(--border); }
  .section-label { font-size: 0.65rem; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); margin-bottom: 1.5rem; }
  section h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.05; letter-spacing: -1.5px; }
  
  /* ── ABOUT ───────────────────────────────────── */
  .about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 5rem; align-items: start; }
  .about-right p { font-size: 0.93rem; color: var(--muted-light); line-height: 1.9; margin-bottom: 1rem; font-weight: 300; }
  .skills-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
  .skills-list span { font-size: 0.68rem; padding: 0.25rem 0.75rem; border: 1px solid var(--border); color: var(--muted-light); border-radius: 2px; transition: all 0.2s; }
  .skills-list span:hover { border-color: var(--text); color: var(--text); }
  
  /* ── EDUCATION ───────────────────────────────── */
  .edu-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
  .edu-item { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; cursor: pointer; transition: box-shadow 0.2s; }
  .edu-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
  .edu-img { width: 100%; height: 220px; object-fit: cover; display: block; filter: grayscale(25%); transition: filter 0.3s; }
  .edu-item:hover .edu-img, .edu-item.open .edu-img { filter: grayscale(0%); }
  .edu-right { padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 0.2rem; position: relative; }
  .edu-year { font-size: 0.67rem; color: var(--muted); letter-spacing: 1px; }
  .edu-right h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: -0.3px; }
  .edu-degree { font-size: 0.77rem; color: var(--muted-light); }
  .edu-arrow { position: absolute; right: 1.2rem; top: 1.2rem; font-size: 0.9rem; color: var(--muted); transition: transform 0.3s; }
  .edu-item.open .edu-arrow { transform: rotate(180deg); }
  .edu-expand { max-height: 0; overflow: hidden; transition: max-height 0.45s cubic-bezier(0.16,1,0.3,1); }
  .edu-expand p { font-size: 0.88rem; color: var(--muted-light); line-height: 1.85; font-weight: 300; padding: 1.2rem 1.4rem; border-top: 1px solid var(--border); }
  .edu-item.open .edu-expand { max-height: 400px; }
  
  /* ── FEATURED PROJECT ────────────────────────── */
  .project-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 3rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    position: relative;
    margin-top: 2rem;
  }
  .project-featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--text);
    border-radius: 4px 4px 0 0;
  }
  .project-featured-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.7rem; }
  .project-featured-number { font-size: 0.68rem; color: var(--muted); font-weight: 600; letter-spacing: 1px; }
  .project-featured-badge { font-size: 0.58rem; padding: 0.16rem 0.6rem; background: var(--text); color: var(--bg); border-radius: 100px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }
  .project-featured h3 { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 0.2rem; }
  .project-featured-sub { font-size: 0.68rem; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1rem; }
  .project-featured-desc { font-size: 0.89rem; color: var(--muted-light); line-height: 1.9; margin-bottom: 1.5rem; font-weight: 300; }
  .project-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
  .project-tags span { font-size: 0.67rem; padding: 0.2rem 0.6rem; background: var(--bg); border: 1px solid var(--border); color: var(--muted-light); border-radius: 2px; }
  
  /* ── PHONE MOCKUP ────────────────────────────── */
  .project-featured-screens { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
  .phone-mockup { width: 240px; height: 480px; border-radius: 28px; border: 5px solid #1a1a1a; overflow: hidden; position: relative; background: #000; box-shadow: 0 24px 48px rgba(0,0,0,0.18), 0 0 0 1px #333; }
  .phone-mockup .screen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
  .phone-mockup .screen.active { opacity: 1; }
  .screen-dots { display: flex; gap: 0.45rem; }
  .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border-hover); border: none; cursor: pointer; transition: background 0.2s, transform 0.2s; padding: 0; }
  .dot.active { background: var(--text); transform: scale(1.4); }
  .gratzel-video { width: 240px; border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,0.07); display: block; }
  
  /* ── SE1 VIDEO ───────────────────────────────── */
  .se1-video { width: 100%; border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 20px 40px rgba(0,0,0,0.1); display: block; }
  
  /* ── PROJECT LIST ────────────────────────────── */
  .project-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); margin-top: 2rem; }
  .project-item { display: grid; grid-template-columns: 46px 1fr auto; gap: 1.5rem; align-items: center; padding: 1.8rem 0; border-bottom: 1px solid var(--border); transition: padding-left 0.25s, background 0.2s; }
  .project-item:hover { padding-left: 0.5rem; background: var(--surface); }
  .project-number { font-size: 0.68rem; color: var(--muted); font-weight: 600; letter-spacing: 1px; }
  .project-info h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; letter-spacing: -0.4px; }
  .project-info p { font-size: 0.84rem; color: var(--muted-light); margin-bottom: 0.65rem; font-weight: 300; line-height: 1.7; max-width: 680px; }
  .project-link { width: 38px; height: 38px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--muted); transition: all 0.2s; flex-shrink: 0; }
  .project-link:hover { border-color: var(--text); color: var(--text); transform: rotate(45deg); }
  
  /* ── CV ──────────────────────────────────────── */
  .cv-block { display: grid; grid-template-columns: 1fr 1.3fr; gap: 5rem; align-items: center; }
  .cv-right p { font-size: 0.93rem; color: var(--muted-light); line-height: 1.85; margin-bottom: 1.8rem; font-weight: 300; }
  .cv-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
  
  /* ── CONTACT ─────────────────────────────────── */
  .contact-block { display: grid; grid-template-columns: 1fr 1.3fr; gap: 5rem; align-items: start; }
  .contact-links { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
  .contact-item { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 0; border-bottom: 1px solid var(--border); transition: padding-left 0.2s; }
  .contact-item:hover { padding-left: 0.4rem; }
  .contact-label { font-size: 0.64rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
  .contact-value { font-size: 0.84rem; color: var(--muted-light); transition: color 0.2s; }
  .contact-item:hover .contact-value { color: var(--text); }
  
  /* ── FOOTER ──────────────────────────────────── */
  footer { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 6vw; border-top: 1px solid var(--border); font-size: 0.68rem; color: var(--muted); }
  
  /* ── REVEAL ──────────────────────────────────── */
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
  .reveal.visible { opacity: 1; transform: translateY(0); }
  
  /* ── FOCUS ───────────────────────────────────── */
  a:focus-visible, button:focus-visible, .edu-item:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
  
  /* ── RESPONSIVE ──────────────────────────────── */
  @media (max-width: 1100px) {
    .hero-inner { grid-template-columns: 1fr 400px; gap: 3.5rem; }
  }
  @media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-photo { aspect-ratio: 4/3; max-width: 500px; }
    .project-featured { grid-template-columns: 1fr; gap: 2.5rem; }
    .project-featured-screens { order: -1; }
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  }
  @media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu { position: fixed; top: 0; right: 0; width: min(78vw, 300px); height: 100vh; background: rgba(255,255,255,0.97); backdrop-filter: blur(18px); border-left: 1px solid var(--border); flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.5rem; padding: 0 2rem; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.16,1,0.3,1); }
    .nav-menu.open { transform: translateX(0); }
    .edu-list { grid-template-columns: 1fr; }
    .project-item { grid-template-columns: 36px 1fr auto; gap: 0.8rem; }
    .cv-block, .contact-block { grid-template-columns: 1fr; gap: 2rem; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    footer { flex-direction: column; gap: 0.3rem; text-align: center; }
    .gratzel-video { width: 200px; }
    .phone-mockup { width: 200px; height: 400px; }
  }
  @media (max-width: 480px) {
    section:not(#hero) { padding: 3rem 5vw; }
    #hero { padding: 5rem 5vw 3rem; }
    #hero h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
    .hero-scroll { display: none; }
    .btn { width: 100%; text-align: center; }
    .edu-item.open .edu-expand { max-height: 600px; }
    .project-featured { padding: 1.8rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  }
  /* ── ML PROJECT ──────────────────────────────── */
.project-featured--ml {
    display: block;
  }
  .ml-top {
    margin-bottom: 2rem;
  }
  .ml-top h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.2rem;
  }
  .ml-images {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1.4fr;
    gap: 1.5rem;
  }
  .ml-image-item img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: block;
    margin-bottom: 0.75rem;
  }
  .ml-caption {
    font-size: 0.78rem;
    color: var(--muted-light);
    line-height: 1.6;
    font-weight: 300;
  }
  @media (max-width: 960px) {
    .ml-images { grid-template-columns: 1fr; }
  }
  /* ── ML PROJECT ──────────────────────────────── */
.project-featured--ml {
    display: block;
  }
  .ml-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
  }
  .ml-header h3 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.3rem;
    line-height: 1.1;
  }
  .ml-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3.5rem;
    align-items: center;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
  }
  .ml-row--reverse {
    grid-template-columns: 1fr 1.3fr;
  }
  .ml-row--reverse .ml-img {
    order: 2;
  }
  .ml-row--reverse .ml-text {
    order: 1;
  }
  .ml-img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .ml-text h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
  }
  .ml-text p {
    font-size: 0.95rem;
    color: var(--muted-light);
    line-height: 1.9;
    font-weight: 300;
  }
  @media (max-width: 900px) {
    .ml-row,
    .ml-row--reverse {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }
    .ml-row--reverse .ml-img { order: 0; }
    .ml-row--reverse .ml-text { order: 1; }
  }
  /* ── EASTER EGG ──────────────────────────────── */
.hero-photo { cursor: pointer; }

.egg-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  backdrop-filter: blur(4px);
}
.egg-backdrop.active { display: block; }

.egg-card {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 201;
  background: #fff;
  border-radius: 12px;
  width: min(340px, 90vw);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  opacity: 0;
}
.egg-card.active {
  display: block;
  animation: eggIn 0.35s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes eggIn {
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.egg-close {
  position: absolute; top: 0.8rem; right: 0.8rem;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  width: 28px; height: 28px;
  border-radius: 50%; cursor: pointer;
  font-size: 0.7rem; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.egg-photo {
  width: 100%; height: 320px;
  object-fit: cover; object-position: center top;
  display: block;
}
.egg-text {
  padding: 1.2rem 1.5rem 1.5rem;
  text-align: center;
}
.egg-label {
  font-size: 0.68rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 0.4rem;
}
.egg-name {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 800;
  letter-spacing: -0.5px;
}