:root {
  --bg: #0c1110;
  --bg-2: #121a18;
  --ink: #e8f0ec;
  --muted: #8fa39a;
  --accent: #d4ff4f;
  --accent-2: #3d9b7a;
  --line: rgba(232, 240, 236, 0.12);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.05;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 4vw;
  backdrop-filter: blur(10px);
  background: rgba(12, 17, 16, 0.65);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
}
nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
nav a:hover { color: var(--accent); }

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: 7rem 4vw 4rem;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(61, 155, 122, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(212, 255, 79, 0.08), transparent 50%),
    linear-gradient(160deg, #0c1110 0%, #152420 45%, #0c1110 100%);
  animation: drift 18s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232,240,236,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,240,236,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
}
@keyframes drift {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.04) translateY(-12px); }
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-2);
  margin-bottom: 0.8rem;
  letter-spacing: 0.04em;
  opacity: 0;
  animation: rise 0.8s 0.1s ease forwards;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 16vw, 9.5rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: rise 0.9s 0.2s ease forwards;
}
.lede {
  max-width: 34rem;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 1.15rem;
  opacity: 0;
  animation: rise 0.9s 0.35s ease forwards;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
  opacity: 0;
  animation: rise 0.9s 0.5s ease forwards;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.35rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
  background: none;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: #101510; }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

.section {
  padding: 5.5rem 4vw;
  border-top: 1px solid var(--line);
}
.section.alt { background: var(--bg-2); }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}
.section-sub {
  color: var(--muted);
  max-width: 40rem;
  margin-bottom: 2.4rem;
}

/* Videos */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}
.video-card {
  border: 1px solid var(--line);
  background: rgba(12, 17, 16, 0.5);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.25s ease;
  text-align: left;
  color: inherit;
  font: inherit;
  padding: 0;
  overflow: hidden;
}
.video-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-4px);
}
.thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.25);
}
.play span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: #101510;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
}
.video-meta { padding: 0.9rem 1rem 1.1rem; }
.video-meta h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.video-meta .tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-2);
}
.more-links {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.more-links a { color: var(--accent); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.88);
  display: grid;
  place-items: center;
  padding: 2vw;
}
.lightbox[hidden] { display: none; }
.lightbox-frame {
  width: min(960px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
}
.lightbox-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-size: 2.2rem;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
  line-height: 1;
}

.company-block {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.company-block:last-child { border-bottom: 0; margin-bottom: 0; }
.company-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.company-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.company-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #000;
  padding: 0.2rem;
  flex-shrink: 0;
}
.company-logo.light {
  background: #fff;
  padding: 0.35rem;
}
.company-head h3 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.03em;
}

.exp-section { padding-top: 5rem; }
.exp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.exp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.4rem 1rem 1.5rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background:
    linear-gradient(165deg, rgba(61, 155, 122, 0.12), transparent 55%),
    rgba(18, 26, 24, 0.7);
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.exp-card:hover {
  border-color: rgba(212, 255, 79, 0.35);
  transform: translateY(-3px);
}
.exp-logo {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #050807;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.exp-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
  padding: 0.35rem;
}
.exp-card[data-light-logo="1"] .exp-logo,
.exp-card.light-logo .exp-logo {
  background: #fff;
}
.exp-card[data-light-logo="1"] .exp-logo img,
.exp-card.light-logo .exp-logo img {
  background: #fff;
  padding: 0.55rem;
}
.exp-role {
  font-size: 0.95rem;
  line-height: 1.35;
  max-width: 14rem;
}
.exp-role strong { color: var(--ink); font-weight: 600; }
.exp-company {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.edu-section { padding-top: 4.5rem; }
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.edu-card {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 1.35rem;
  align-items: center;
  padding: 1.35rem 1.4rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background:
    linear-gradient(165deg, rgba(61, 155, 122, 0.1), transparent 55%),
    rgba(18, 26, 24, 0.7);
  transition: border-color .25s ease, transform .25s ease;
}
.edu-card:hover {
  border-color: rgba(212, 255, 79, 0.35);
  transform: translateY(-3px);
}
.edu-logo {
  width: 148px;
  height: 148px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.edu-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 0.35rem;
  background: #fff;
  transform: scale(1.12);
  transform-origin: center;
}
.edu-degree {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}
.edu-school {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 0.45rem;
}
.edu-meta {
  font-size: 0.88rem;
  color: var(--muted);
}
.edu-loc {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.35rem;
  letter-spacing: 0.03em;
}

.toolset {
  display: grid;
  gap: 2.5rem;
}
.tool-block h3 {
  font-size: 1.15rem;
  margin-bottom: 1.1rem;
  color: var(--accent);
}
.icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 1.6rem;
  margin-bottom: 1rem;
}
.icon-row figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 72px;
}
.icon-row img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.35));
}
.icon-row figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
}
.role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 0.35rem;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
  align-items: stretch;
}
.work-card {
  border: 1px solid var(--line);
  background: rgba(18, 26, 24, 0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 420px;
  width: 100%;
}
.work-card.dim { opacity: 0.88; }
.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.work-card:hover .card-media img { transform: scale(1.04); }
.card-media.placeholder {
  background:
    linear-gradient(135deg, rgba(61,155,122,0.35), rgba(12,17,16,0.95)),
    radial-gradient(circle at 30% 20%, rgba(212,255,79,0.12), transparent 45%);
}
.play-dot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.play-dot::before {
  content: "▶";
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #101510;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.work-body { padding: 1.1rem 1.15rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.work-body h4 { font-size: 1.2rem; margin: 0.15rem 0 0.55rem; letter-spacing: 0.01em; }
.blurb { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; flex: 1; line-height: 1.55; }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
}
.btn.tiny {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  background: var(--accent);
  color: #101510;
  border: 0;
  text-decoration: none;
}
.btn.tiny.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.tiny.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.sm { padding: 0.55rem 0.9rem; font-size: 0.85rem; }
.section.personal { background: #0a0e0d; }
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  max-width: 56rem;
}
.about-grid > p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.about-meta { list-style: none; display: grid; gap: 0.9rem; }
.about-meta li {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  color: var(--ink);
}
.about-meta span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-2);
  margin-bottom: 0.25rem;
}
.about-meta a { color: var(--accent); }

/* Project detail */
.project-page .project-main {
  padding: 7rem 4vw 4rem;
  max-width: 960px;
  margin: 0 auto;
}
.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 1.2rem;
}
.back-link:hover { color: var(--accent); }
.project-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  line-height: 0.95;
  margin: 0.4rem 0 0.6rem;
}
.project-hero-media {
  position: relative;
  margin: 1.8rem 0 2rem;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border: 1px solid var(--line);
}
.project-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a2e28, #0c1110);
}
.hero-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #101510;
  font-size: 1.2rem;
  cursor: pointer;
}
.project-body p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.1rem;
}
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}
.project-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
}
.project-cta { margin-top: 0.5rem; opacity: 1; animation: none; }

@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.proj {
  padding: 1.4rem 1.2rem;
  border: 1px solid var(--line);
  background: rgba(12, 17, 16, 0.4);
  transition: border-color 0.2s ease, transform 0.25s ease;
}
.proj:hover {
  border-color: var(--accent-2);
  transform: translateY(-4px);
}
.proj h3 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-2);
  margin-bottom: 0.6rem;
}
.proj p:not(.tag) { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.7rem; }
.inline {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.inline:hover { text-decoration: underline; }


.papers {
  list-style: none;
  display: grid;
  gap: 0.9rem;
  max-width: 52rem;
}
.paper-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(61, 155, 122, 0.1), transparent 55%),
    rgba(18, 26, 24, 0.65);
  transition: border-color .25s ease, transform .25s ease;
}
.paper-card:hover {
  border-color: rgba(212, 255, 79, 0.35);
  transform: translateY(-2px);
}
.paper-index {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1;
}
.paper-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}
.paper-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.paper-cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
}

.contact .phones {
  margin-top: 1.4rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 4vw 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.mono { font-family: var(--font-mono); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .exp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  nav { display: none; }
  .hero { padding-top: 6rem; align-items: center; }
  .hero h1 { font-size: clamp(3.8rem, 18vw, 5.5rem); }
  .exp-grid { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
  .exp-logo { width: 88px; height: 88px; }
  .edu-grid { grid-template-columns: 1fr; }
  .edu-card { grid-template-columns: 112px 1fr; gap: 1rem; padding: 1.1rem; }
  .edu-logo { width: 112px; height: 112px; }
}
