:root {
  --bg: #07111f;
  --bg-2: #0a1729;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f4f7fb;
  --muted: #b8c4d6;
  --muted-2: #8fa1ba;
  --cyan: #22d3ee;
  --teal: #2dd4bf;
  --amber: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-system, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -999px; top: 12px; z-index: 100;
  background: var(--cyan); color: #04111d; padding: 10px 14px; border-radius: 999px; font-weight: 800;
}
.skip-link:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(7, 17, 31, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 1rem; }
.brand-mark {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--teal)); color: #04111d; font-weight: 900; letter-spacing: -0.04em;
}
.brand-text { color: var(--muted); font-weight: 600; }
.brand-text strong { color: var(--text); }
.nav-menu { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { text-decoration: none; color: var(--muted); font-weight: 650; padding: 10px 12px; border-radius: 999px; }
.nav-menu a:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.nav-cta { color: #04111d !important; background: var(--amber); margin-left: 6px; }
.nav-cta:hover { background: #fbbf24 !important; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.06); cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 5px auto; background: var(--text); border-radius: 2px; }

/* Hero */
.hero { position: relative; padding: 150px 0 68px; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; overflow: hidden; z-index: -1; background: radial-gradient(circle at 18% 8%, rgba(34, 211, 238, .20), transparent 34%), radial-gradient(circle at 84% 18%, rgba(245, 158, 11, .14), transparent 32%), linear-gradient(180deg, #081426 0%, var(--bg) 78%); }
.circuit { width: 100%; height: 100%; opacity: .34; }
.circuit path { fill: none; stroke: rgba(34, 211, 238, .48); stroke-width: 2; stroke-dasharray: 14 12; animation: trace 24s linear infinite; }
.circuit circle { fill: var(--amber); }
@keyframes trace { to { stroke-dashoffset: -520; } }
.glow { position: absolute; border-radius: 999px; filter: blur(70px); opacity: .5; }
.glow-a { width: 380px; height: 380px; left: -120px; top: 120px; background: rgba(34, 211, 238, .30); }
.glow-b { width: 340px; height: 340px; right: -100px; top: 60px; background: rgba(45, 212, 191, .20); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 54px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #a7f3d0; background: rgba(45, 212, 191, .10); border: 1px solid rgba(45, 212, 191, .28); padding: 8px 13px; border-radius: 999px; font-size: .9rem; font-weight: 750; }
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 6px rgba(52, 211, 153, .14); }
h1 { font-size: clamp(3.2rem, 8vw, 6.7rem); line-height: .92; letter-spacing: -0.065em; margin: 24px 0 18px; }
.gradient-text { background: linear-gradient(92deg, var(--cyan), var(--teal) 48%, var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.role { font-size: clamp(1rem, 2vw, 1.18rem); font-weight: 800; color: #dbeafe; margin: 0 0 18px; }
.role-sep { color: var(--amber); padding: 0 3px; }
.lede { color: var(--muted); font-size: clamp(1.02rem, 1.7vw, 1.17rem); max-width: 720px; margin: 0; }
.lede.small { margin-inline: auto; }
.legal-chip { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: rgba(245, 158, 11, .10); border: 1px solid rgba(245, 158, 11, .32); color: #fde68a; }
.legal-label { background: var(--amber); color: #1c1002; border-radius: 999px; padding: 4px 10px; font-size: .82rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 28px; }
.hero-actions.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 13px 21px; border-radius: 999px; text-decoration: none; font-weight: 850; border: 1px solid transparent; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--cyan), var(--teal)); color: #04111d; box-shadow: 0 16px 38px rgba(34, 211, 238, .24); }
.btn-ghost { background: rgba(255,255,255,.06); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.11); }
.socials { display: flex; flex-wrap: wrap; gap: 10px 20px; list-style: none; padding: 0; margin: 28px 0 0; }
.socials a { color: var(--muted); text-decoration: none; font-weight: 750; }
.socials a:hover { color: var(--cyan); }
.photo-frame { position: relative; max-width: 400px; margin-left: auto; border-radius: 34px; padding: 10px; background: linear-gradient(160deg, rgba(34,211,238,.75), rgba(255,255,255,.10) 42%, rgba(245,158,11,.72)); box-shadow: var(--shadow); transform: rotate(1.5deg); }
.photo-frame img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 42% top; border-radius: 26px; background: #dbeafe; animation: slowZoom 14s ease-in-out infinite alternate; }
.photo-badge { position: absolute; left: 22px; right: 22px; bottom: 22px; padding: 14px 16px; border-radius: 18px; background: rgba(4, 17, 29, .82); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(12px); }
.photo-badge strong, .photo-badge span { display: block; }
.photo-badge span { color: var(--muted); font-size: .92rem; }
.stats { margin-top: 58px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats article { padding: 20px; border-radius: 20px; background: rgba(255,255,255,.055); border: 1px solid var(--line); }
.stats strong { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; color: var(--cyan); display: block; }
.stats span { color: var(--muted); font-weight: 650; }

/* Sections */
.section { padding: 92px 0; }
section[id] { scroll-margin-top: 86px; }
.section-dark { background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(34,211,238,.035), rgba(255,255,255,.018)); border-block: 1px solid rgba(255,255,255,.07); }
.section-kicker { color: var(--amber); font-weight: 900; text-transform: uppercase; letter-spacing: .14em; font-size: .82rem; margin: 0 0 12px; }
.section-title { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.04; letter-spacing: -0.045em; margin: 0 0 34px; max-width: 820px; }
.about-grid, .edu-grid, .two-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.edu-grid, .two-col { grid-template-columns: repeat(2, 1fr); margin-top: 18px; }
.edu-grid { margin-top: 0; }
.card, .skill-card, .project-card, .timeline-card, .contact-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.card { padding: 26px; }
.card h3, .skill-card h3, .project-card h3, .timeline-card h3 { margin: 0 0 10px; line-height: 1.25; }
.card p { color: var(--muted); }
.check-list, .plain-list { margin: 0; padding-left: 1.15rem; color: var(--muted); }
.check-list li::marker { color: var(--teal); }
.plain-list li::marker { color: var(--amber); }
.facts { margin: 0; display: grid; gap: 13px; }
.facts div { display: grid; gap: 2px; }
.facts dt { color: var(--muted-2); font-size: .84rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.facts dd { margin: 0; font-weight: 750; }

/* Skills */
.skills-grid, .projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-card, .project-card { padding: 26px; transition: transform .22s ease, border-color .22s ease, background .22s ease; }
.skill-card:hover, .project-card:hover { transform: translateY(-5px); border-color: rgba(34,211,238,.45); background: var(--panel-strong); }
.skill-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.level { flex: 0 0 auto; font-size: .78rem; font-weight: 900; color: #bfdbfe; border: 1px solid rgba(147,197,253,.38); background: rgba(59,130,246,.14); border-radius: 999px; padding: 5px 9px; }
.level-advanced { color: #052e1b; background: #5eead4; border-color: #5eead4; }
.skill-card p, .project-card p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.tags li { font-size: .84rem; font-weight: 750; color: #dbeafe; background: rgba(34,211,238,.10); border: 1px solid rgba(34,211,238,.22); padding: 6px 9px; border-radius: 999px; }

/* Timeline */
.timeline { display: grid; gap: 18px; }
.timeline-item { display: grid; grid-template-columns: 190px 1fr; gap: 22px; }
.timeline-meta { color: var(--muted); font-weight: 800; display: grid; align-content: start; gap: 3px; padding-top: 22px; }
.timeline-meta span:first-child { color: var(--cyan); }
.timeline-card { position: relative; padding: 26px; }
.timeline-card::before { content: ""; position: absolute; left: -34px; top: 30px; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 7px rgba(245,158,11,.14); }
.place { color: var(--amber) !important; font-weight: 800; margin-top: -4px; }
.timeline-card ul { color: var(--muted); margin: 14px 0 0; padding-left: 1.15rem; }
.timeline-card li::marker { color: var(--cyan); }

/* Projects */
.project-metric { color: var(--amber); font-weight: 950; font-size: 1.45rem; letter-spacing: -0.03em; margin: 0 0 8px !important; }
.project-result { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.edu-year { color: var(--cyan); font-weight: 900; margin: 0 0 8px; }
.modules { font-size: .96rem; }

/* Contact */
.contact-section { padding-top: 60px; }
.contact-card { text-align: center; padding: clamp(30px, 6vw, 62px); background: radial-gradient(circle at top left, rgba(34,211,238,.18), transparent 34%), radial-gradient(circle at bottom right, rgba(245,158,11,.16), transparent 34%), var(--panel); }
.contact-card h2 { font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -0.05em; margin: 0 0 18px; }
.contact-line { color: var(--muted); font-weight: 750; margin: 24px 0 0; }
.site-footer { border-top: 1px solid rgba(255,255,255,.08); padding: 28px 0; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-row p { margin: 0; }
.footer-row a { color: var(--cyan); text-decoration: none; font-weight: 800; }


/* Abstract details and work gallery */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 80;
  background: linear-gradient(90deg, var(--cyan), var(--teal), var(--amber));
}
.photo-frame::after {
  content: ""; position: absolute; width: 150px; height: 150px; right: -52px; top: -52px;
  border: 1px solid rgba(34, 211, 238, .45); border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(34, 211, 238, .05), 0 0 0 38px rgba(245, 158, 11, .04);
  pointer-events: none;
}
.float-chip {
  position: absolute; z-index: 2; padding: 8px 12px; border-radius: 999px;
  background: rgba(4, 17, 29, .86); border: 1px solid rgba(255,255,255,.20);
  color: #e0f2fe; font-size: .82rem; font-weight: 850; backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0,0,0,.28); animation: floaty 5s ease-in-out infinite alternate;
}
.chip-one { left: -18px; top: 34px; }
.chip-two { right: -14px; bottom: 112px; animation-delay: -2.4s; }
@keyframes floaty { from { transform: translateY(-4px); } to { transform: translateY(6px); } }
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.045); } }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 18px; }
.photo-card { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); box-shadow: 0 18px 50px rgba(0,0,0,.20); }
.photo-card img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 34%; transition: transform .6s ease, filter .6s ease; }
.photo-card:hover img { transform: scale(1.045); filter: saturate(1.08) contrast(1.03); }
.photo-card figcaption {
  position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 15px 17px;
  border-radius: 17px; background: linear-gradient(180deg, rgba(4,17,29,.78), rgba(4,17,29,.94));
  border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(10px);
}
.photo-card figcaption strong, .photo-card figcaption span { display: block; }
.photo-card figcaption strong { font-size: 1.08rem; }
.photo-card figcaption span { color: var(--muted); }

/* Motion */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.22,.8,.28,1); }
.reveal-left { transform: translateX(-26px); }
.reveal-right { transform: translateX(26px); }
.reveal-left.visible, .reveal-right.visible { transform: none; }
.reveal.visible { opacity: 1; transform: none; }
.photo-frame.reveal.visible { transform: rotate(1.5deg); }

@media (max-width: 920px) {
  .hero-grid, .about-grid, .skills-grid, .projects-grid, .gallery { grid-template-columns: 1fr; }
  .edu-grid, .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .timeline-meta { padding-top: 0; }
  .timeline-card::before { display: none; }
  .photo-frame { margin-inline: auto; }
  .nav-toggle { display: block; }
  .nav-menu { position: absolute; top: 74px; left: 20px; right: 20px; display: none; flex-direction: column; align-items: stretch; padding: 14px; border-radius: 20px; background: rgba(8, 20, 38, .98); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-menu.open { display: flex; }
  .nav-menu a { display: block; }
  .nav-cta { margin-left: 0; text-align: center; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 28px); }
  .hero { padding-top: 122px; }
  .stats { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .brand-text { display: none; }
  .section { padding: 70px 0; }
  .chip-one { left: 8px; }
  .chip-two { right: 8px; }
  .photo-frame::after { width: 112px; height: 112px; right: -28px; top: -28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .photo-frame.reveal.visible { transform: none; }
}
