/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f172a;
  --bg-alt:    #1e293b;
  --surface:   #334155;
  --border:    #475569;
  --text:      #e2e8f0;
  --text-dim:  #94a3b8;
  --accent:    #38bdf8;
  --accent2:   #818cf8;
  --white:     #f8fafc;
  --radius:    8px;
  --max-w:     1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ── Nav ────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s, box-shadow .3s;
}
#nav.scrolled {
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.5rem;
}
.nav-brand {
  font-weight: 700; font-size: 1.15rem;
  color: var(--white); text-decoration: none;
}
.nav-links a {
  color: var(--text-dim); text-decoration: none;
  margin-left: 1.6rem; font-size: .9rem;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }

/* ── Hero ───────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background: radial-gradient(ellipse at 50% 30%, rgba(56,189,248,.08) 0%, transparent 60%),
              var(--bg);
}
.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: .5rem;
}
.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--accent);
  max-width: 650px; margin: 0 auto 1rem;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-block; padding: .7rem 1.6rem;
  border-radius: var(--radius); font-weight: 600;
  text-decoration: none; font-size: .95rem;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); color: var(--bg);
}
.btn-primary:hover { box-shadow: 0 4px 14px rgba(56,189,248,.35); }
.btn-outline {
  border: 1.5px solid var(--border); color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Sections ───────────────────────────────────────── */
.section { padding: 5rem 1.5rem; }
.section-alt { background: var(--bg-alt); }
.container { max-width: var(--max-w); margin: 0 auto; }

h2 {
  font-size: 2rem; font-weight: 700; color: var(--white);
  margin-bottom: 2rem;
}
.section-intro {
  color: var(--text-dim); font-size: 1.05rem;
  margin-bottom: 2.5rem; max-width: 600px;
}

/* ── Portfolio / Project Showcase ───────────────────── */
.project-showcase {
  display: grid; gap: 2rem;
}
.project-card-large {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  transition: border-color .3s;
}
.project-card-large:hover { border-color: var(--accent); }
.project-header {
  display: flex; align-items: baseline; gap: 1rem;
  flex-wrap: wrap; margin-bottom: .5rem;
}
.project-header h3 {
  color: var(--white); font-size: 1.6rem; font-weight: 700;
}
.project-tech {
  color: var(--text-dim); font-size: .8rem;
  background: var(--surface); padding: .2rem .7rem;
  border-radius: 4px;
}
.project-tagline {
  color: var(--accent); font-style: italic;
  font-size: 1.05rem; margin-bottom: 1rem;
}
.project-card-large > p {
  margin-bottom: 1.5rem; line-height: 1.8;
}
.project-highlights {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.highlight {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.highlight strong {
  display: block; color: var(--accent);
  font-size: .85rem; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: .3rem;
}
.highlight span {
  color: var(--text-dim); font-size: .9rem; line-height: 1.5;
}
.highlight code {
  background: var(--surface); padding: .1rem .4rem;
  border-radius: 3px; font-size: .85rem;
}
.project-links { display: flex; gap: 1rem; flex-wrap: wrap; }

.project-card-small {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  transition: border-color .3s;
}
.project-card-small:hover { border-color: var(--accent); }
.project-card-small .project-header { margin-bottom: .5rem; }
.project-card-small .project-header h3 { font-size: 1.2rem; }
.project-card-small > p {
  margin-bottom: 1.2rem; font-size: .95rem;
  color: var(--text-dim); line-height: 1.7;
}

/* ── About ──────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
}
.about-text p { margin-bottom: 1rem; }
.about-text h3 {
  color: var(--accent); font-size: 1.15rem;
  margin: 1.5rem 0 .5rem;
}

/* ── Cards (What I Do) ─────────────────────────────── */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-icon { font-size: 2rem; margin-bottom: .8rem; }
.card h3 { color: var(--white); margin-bottom: .6rem; font-size: 1.1rem; }
.card p { color: var(--text-dim); font-size: .93rem; }

/* ── Expertise ──────────────────────────────────────── */
.expertise-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem; margin-bottom: 3rem;
}
.expertise-col h3 {
  color: var(--accent); font-size: 1.05rem;
  margin-bottom: .6rem;
}
.expertise-col ul { list-style: none; }
.expertise-col li {
  padding: .35rem 0; color: var(--text-dim); font-size: .93rem;
  border-bottom: 1px solid rgba(71,85,105,.3);
}
.expertise-col li:last-child { border-bottom: none; }
.expertise-col li strong { color: var(--text); }
.career-heading { margin-top: 2rem; }

/* ── Background Section ────────────────────────────── */
.bg-summary {
  max-width: 800px; margin-bottom: 2.5rem;
  font-size: 1.02rem; line-height: 1.8;
}
.bg-columns {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.bg-col h3 {
  color: var(--accent); font-size: 1.1rem;
  margin-bottom: .8rem;
}
.bg-col ul { list-style: none; }
.bg-col li {
  padding: .4rem 0; color: var(--text-dim); font-size: .93rem;
  border-bottom: 1px solid rgba(71,85,105,.3);
  padding-left: 1rem;
  position: relative;
}
.bg-col li::before {
  content: '\2022'; position: absolute; left: 0;
  color: var(--accent);
}
.bg-col li:last-child { border-bottom: none; }

/* ── Timeline ───────────────────────────────────────── */
.timeline-heading {
  color: var(--white); font-size: 1.3rem; font-weight: 700;
  margin-bottom: 1.5rem;
}
.timeline { border-left: 2px solid var(--border); padding-left: 2rem; }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute;
  left: -2.55rem; top: .45rem;
  width: 12px; height: 12px;
  background: var(--accent); border-radius: 50%;
}
.timeline-date {
  color: var(--accent); font-size: .85rem; font-weight: 600;
  margin-bottom: .2rem;
}
.timeline-body h3 { color: var(--white); font-size: 1.1rem; margin-bottom: .4rem; }
.timeline-body p { color: var(--text-dim); font-size: .93rem; }

/* ── Patents ────────────────────────────────────────── */
.patents-list { display: grid; gap: 1.2rem; }
.patent {
  display: block; text-decoration: none; color: inherit;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s, transform .2s;
}
.patent:hover { border-color: var(--accent); transform: translateY(-2px); }
.patent-id {
  color: var(--accent); font-weight: 700;
  font-size: .9rem; display: block; margin-bottom: .3rem;
}
.patent p { color: var(--text-dim); font-size: .95rem; }

/* ── Contact ────────────────────────────────────────── */
.contact-container { text-align: center; max-width: 600px; }
.contact-container p { margin-bottom: 2rem; }
.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Footer ─────────────────────────────────────────── */
footer {
  text-align: center; padding: 2rem 1rem;
  color: var(--text-dim); font-size: .85rem;
  border-top: 1px solid var(--border);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .nav-links a { margin-left: .8rem; font-size: .8rem; }
  .section { padding: 3.5rem 1rem; }
  .project-card-large { padding: 1.5rem; }
  .project-highlights { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .nav-links { display: none; }
}
