:root {
  --ink: #f4f7fb;
  --muted: #9ca8b9;
  --black: #06080d;
  --panel: #0c111a;
  --panel-light: #121925;
  --line: #202b3a;
  --blue: #3f82ff;
  --navy: #0b2b57;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.site-header {
  align-items: center;
  background: rgba(6, 8, 13, .82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  height: 84px;
  justify-content: space-between;
  padding: 0 max(5vw, 32px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { font-size: 17px; font-weight: 800; letter-spacing: -.035em; }
.brand span { color: var(--blue); }
nav { align-items: center; display: flex; gap: 36px; }
nav a { color: var(--muted); font-size: 13px; font-weight: 600; transition: color .2s; }
nav a:hover { color: var(--ink); }
.nav-contact { border: 1px solid var(--line); border-radius: 999px; color: var(--ink); padding: 12px 19px; }

.hero {
  align-items: center;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  min-height: calc(100vh - 84px);
  overflow: hidden;
  padding: 70px max(5vw, 32px) 90px;
}
.eyebrow { align-items: center; color: #aab6c7; display: flex; font-size: 12px; font-weight: 700; gap: 10px; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow span { background: var(--blue); border-radius: 50%; box-shadow: 0 0 12px var(--blue); height: 7px; width: 7px; }
h1 { font-size: clamp(48px, 6.4vw, 94px); letter-spacing: -.065em; line-height: .98; margin: 30px 0; max-width: 900px; }
h1 strong { color: var(--blue); font-weight: 700; }
em { color: var(--muted); font-family: Georgia, serif; font-weight: 400; }
.hero-intro { color: var(--muted); font-size: 17px; line-height: 1.75; max-width: 600px; }
.hero-actions { display: flex; gap: 12px; margin-top: 38px; }
.button { align-items: center; border: 1px solid var(--line); border-radius: 4px; display: inline-flex; font-size: 14px; font-weight: 700; gap: 28px; padding: 16px 20px; transition: .25s ease; }
.button.primary { background: var(--blue); border-color: var(--blue); color: white; }
.button:hover { transform: translateY(-2px); }
.button.primary:hover { background: #669cff; }
.button.secondary:hover { border-color: var(--blue); }

.hero-visual { min-height: 460px; position: relative; }
.portrait-frame { aspect-ratio: 1 / 1; background: var(--panel); border: 1px solid #243b5c; border-radius: 14px; box-shadow: 0 34px 90px rgba(0,0,0,.55), 0 0 80px rgba(28,96,205,.15); left: 18%; margin: 0; overflow: hidden; position: absolute; top: 8%; transform: rotate(1.5deg); width: 66%; z-index: 3; }
.portrait-frame::after { background: linear-gradient(180deg, transparent 68%, rgba(4,9,17,.4)); content: ""; inset: 0; pointer-events: none; position: absolute; }
.portrait-frame img {
  display: block;
  height: 100%;
  object-fit: contain;
  object-position: center;
  width: 100%;
}
.portrait-label { align-items: center; background: rgba(10,17,28,.94); border: 1px solid #263853; border-radius: 8px; bottom: 5%; box-shadow: 0 20px 45px rgba(0,0,0,.38); display: flex; gap: 15px; left: 2%; padding: 15px 18px; position: absolute; z-index: 5; }
.portrait-label > span { align-items: center; background: var(--blue); border-radius: 50%; display: flex; font-family: var(--font-geist-mono), monospace; font-size: 10px; height: 32px; justify-content: center; width: 32px; }
.portrait-label div { display: flex; flex-direction: column; gap: 4px; }
.portrait-label strong { font-size: 12px; }
.portrait-label small { color: var(--muted); font-size: 9px; letter-spacing: .04em; }
.orb { border-radius: 50%; filter: blur(70px); opacity: .25; position: absolute; }
.orb-one { background: #1d6dff; height: 350px; right: -10%; top: 5%; width: 350px; }
.orb-two { background: #123a78; bottom: 0; height: 250px; left: 10%; width: 250px; }

.section { border-top: 1px solid var(--line); padding: 120px max(5vw, 32px); }
.section-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.section-label span { color: var(--blue); margin-right: 12px; }
.about-content { display: grid; gap: 10vw; grid-template-columns: 1.1fr .9fr; margin-top: 55px; }
h2 { font-size: clamp(38px, 4.6vw, 66px); letter-spacing: -.055em; line-height: 1.08; margin: 0; }
.about-content p, .skills-grid p { color: var(--muted); font-size: 16px; line-height: 1.8; margin: 0 0 22px; }
.education { background: var(--panel); }
.education-card { align-items: end; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; gap: 8vw; grid-template-columns: 1.1fr .9fr; margin-top: 55px; padding: 48px 0; }
.education-date { color: var(--blue); font-family: var(--font-geist-mono), monospace; font-size: 12px; letter-spacing: .08em; margin: 0 0 18px; text-transform: uppercase; }
.education-school h3 { font-size: 24px; letter-spacing: -.03em; margin: 0 0 16px; }
.education-school p { color: var(--muted); line-height: 1.8; margin: 0; }
.education-school .education-location { color: #a9c9ff; font-size: 13px; margin: -7px 0 14px; }
.section-heading { display: grid; grid-template-columns: .65fr 1.35fr; }
.section-heading h2 { margin-bottom: 65px; }

.project-list { border-top: 1px solid var(--line); }
.project-card { align-items: start; border-bottom: 1px solid var(--line); display: grid; gap: 35px; grid-template-columns: 55px minmax(0, 1fr) 54px; overflow: hidden; padding: 42px 0; transition: background .25s, padding .25s; }
.project-card:hover { background: var(--panel); padding-left: 22px; padding-right: 22px; }
.project-number { color: var(--blue); font-family: var(--font-geist-mono), monospace; font-size: 12px; padding-top: 8px; }
.project-content { min-width: 0; }
.project-content h3 { font-size: 27px; letter-spacing: -.03em; margin: 0 0 14px; }
.project-content p { color: var(--muted); line-height: 1.7; margin: 0; max-width: 760px; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 23px; }
.tags span { background: #101a29; border: 1px solid #1e3352; border-radius: 999px; color: #a9c9ff; font-size: 11px; padding: 7px 11px; }
.project-gallery { display: grid; gap: 12px; grid-template-columns: 1.35fr .65fr; margin-top: 28px; max-width: 850px; }
.project-image { aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; position: relative; }
.project-image img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .35s ease;
  width: 100%;
}
.project-image:hover img { transform: scale(1.025); }
.system-flow { background: linear-gradient(135deg, #0b1422, #0b1d36); border: 1px solid #213654; border-radius: 8px; display: flex; gap: 10px; margin-top: 28px; max-width: 100%; overflow-x: auto; padding: 24px; width: 100%; }
.flow-group { align-items: center; display: flex; flex: 1 0 auto; gap: 10px; }
.flow-step { align-items: center; background: rgba(11,43,87,.7); border: 1px solid #294c7d; border-radius: 6px; display: flex; flex-direction: column; font-size: 12px; gap: 8px; min-height: 76px; justify-content: center; min-width: 128px; padding: 12px; text-align: center; }
.flow-step span { color: #75a8ff; font-family: var(--font-geist-mono), monospace; font-size: 9px; }
.flow-group i { color: var(--blue); font-size: 18px; font-style: normal; }
.project-card > a { align-items: center; border: 1px solid var(--line); border-radius: 50%; display: flex; font-size: 20px; height: 48px; justify-content: center; transition: .2s; width: 48px; }
.project-card > a:hover { background: var(--blue); border-color: var(--blue); }

.skills { background: var(--panel); }
.skills-grid { display: grid; gap: 11vw; grid-template-columns: 1fr 1fr; margin-top: 55px; }
.skills-grid h2 { margin-bottom: 25px; }
.skills-grid ul { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; list-style: none; margin: 0; padding: 0; }
.skills-grid li { border-bottom: 1px solid var(--line); font-size: 15px; padding: 18px 5px; }
.skills-grid li span { color: #546173; font-family: var(--font-geist-mono), monospace; font-size: 10px; margin-right: 15px; }

.contact { background: linear-gradient(145deg, #07101d, #0b1e38); text-align: center; }
.contact .eyebrow { justify-content: center; }
.contact h2 { font-size: clamp(50px, 7vw, 94px); margin: 35px auto 25px; }
.contact > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; margin: 0 auto; max-width: 570px; }
.contact-links { display: flex; gap: 30px; justify-content: center; margin-top: 45px; }
.contact-links a { border-bottom: 1px solid var(--blue); font-size: 13px; font-weight: 700; padding-bottom: 5px; }
footer { align-items: center; color: var(--muted); display: flex; font-size: 12px; justify-content: space-between; padding: 34px max(5vw, 32px); }

@media (max-width: 820px) {
  nav a:not(.nav-contact) { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 90px; }
  .hero-visual { min-height: 350px; }
  .portrait-frame { left: 17%; width: 66%; }
  .about-content, .education-card, .section-heading, .skills-grid { gap: 45px; grid-template-columns: 1fr; }
  .skills-grid ul { grid-template-columns: 1fr; }
  .system-flow { flex-direction: column; overflow-x: hidden; }
  .flow-group { flex: 0 1 auto; width: 100%; }
  .flow-step { flex: 1; width: 100%; }
  .flow-group i, .system-flow > i { align-self: center; transform: rotate(90deg); }
  .section { padding-bottom: 85px; padding-top: 85px; }
}

@media (max-width: 520px) {
  .site-header { height: 72px; padding-left: 20px; padding-right: 20px; }
  .hero, .section { padding-left: 20px; padding-right: 20px; }
  h1 { font-size: 50px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { justify-content: space-between; }
  .project-card { gap: 18px; grid-template-columns: 28px 1fr; }
  .project-card > a { display: none; }
  .project-gallery { grid-template-columns: 1fr; }
  .contact-links { flex-wrap: wrap; }
  footer { align-items: flex-start; flex-direction: column; gap: 18px; padding-left: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
