@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #12161d;
  --ink-soft: #2b323d;
  --paper: #faf8f4;
  --paper-dim: #f1ede4;
  --line: #e3ddd0;
  --accent: #c1793a;
  --accent-dark: #9c5f2b;
  --white: #ffffff;
  --muted: #6b7280;
  --radius: 14px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Sora', sans-serif;
  line-height: 1.15;
  margin: 0;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 96px 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 14px;
}

.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; margin-top: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--accent-dark); }
.nav-cta {
  background: var(--ink);
  color: var(--white);
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.lang-toggle:hover { border-color: var(--ink); color: var(--ink); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 170px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(193,121,58,0.25), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 56px;
  align-items: flex-start;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #d9c8ae;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #6fd48a; }
.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  color: var(--white);
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  margin-top: 20px;
  font-size: 1.15rem;
  color: #c7c2b8;
  max-width: 540px;
}
.hero-sub-em {
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
}
.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(255,255,255,0.25); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.55); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #262d38; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-disabled {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line);
  cursor: default;
}
.btn-disabled:hover { transform: none; }

.hero-photo-wrap { display: flex; justify-content: center; }
.hero-photo {
  width: 260px; height: 260px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.hero-stats {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 30px;
}
.hero-stats .stat b {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  color: var(--white);
}
.hero-stats .stat span {
  font-size: 0.85rem;
  color: #a9a397;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-text p { color: var(--ink-soft); font-size: 1.02rem; }
.about-text p + p { margin-top: 16px; }

.journey {
  border-left: 2px solid var(--line);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.journey-step { position: relative; }
.journey-step::before {
  content: "";
  position: absolute;
  left: -33px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--line);
}
.journey-step .yr { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent-dark); text-transform: uppercase; }
.journey-step h4 { font-size: 1.02rem; margin-top: 4px; }
.journey-step p { color: var(--muted); font-size: 0.94rem; margin-top: 4px; }

/* ---------- Stack ---------- */
.stack-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.stack-group h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.stack-credentials { margin-top: 28px; }
.credentials-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-dark);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.credentials-link:hover { border-color: var(--accent-dark); }

/* ---------- Projects ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 18px 40px -22px rgba(20,20,20,0.25); transform: translateY(-2px); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card h3 { font-size: 1.2rem; }
.status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}
.status-live { background: #e6f4ea; color: #1e7a3e; }
.status-soon { background: var(--paper-dim); color: var(--muted); }
.card p.desc { color: var(--muted); font-size: 0.95rem; flex-grow: 1; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag { font-size: 0.76rem; background: var(--paper-dim); color: var(--ink-soft); padding: 4px 10px; border-radius: 6px; }
.card-cta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.card-cta .btn { font-size: 0.82rem; padding: 8px 14px; }

/* ---------- Apps / Manual feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.feature-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-card.alt { background: var(--accent); color: var(--white); }
.feature-card h3 { font-size: 1.3rem; color: var(--white); }
.feature-card p { color: rgba(255,255,255,0.78); font-size: 0.96rem; }
.feature-card .btn-ghost { align-self: flex-start; margin-top: 6px; }

/* ---------- Experience ---------- */
.timeline { display: flex; flex-direction: column; }
.tl-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.tl-item:first-child { border-top: none; }
.tl-when { font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.tl-role h4 { font-size: 1.08rem; }
.tl-role .org { color: var(--accent-dark); font-weight: 600; font-size: 0.94rem; margin-top: 2px; }
.tl-role p { color: var(--muted); font-size: 0.94rem; margin-top: 8px; }

/* ---------- Education ---------- */
.edu-list { display: flex; flex-direction: column; gap: 4px; }
.edu-item {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.edu-item:first-child { border-top: none; }
.edu-item .deg { font-weight: 600; }
.edu-item .inst { color: var(--muted); font-size: 0.92rem; }
.edu-item .yr { color: var(--muted); font-size: 0.88rem; white-space: nowrap; }

/* ---------- Contact / Footer ---------- */
.contact-band {
  background: var(--ink);
  color: var(--paper);
  padding: 90px 0;
  text-align: center;
}
.contact-band h2 { color: var(--white); font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.contact-band p { color: #b9b3a6; margin-top: 14px; font-size: 1.05rem; }
.contact-actions { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact-links {
  margin-top: 44px;
  display: flex; gap: 34px; justify-content: center; flex-wrap: wrap;
  font-size: 0.92rem; color: #d9c8ae;
}
.contact-links a:hover { color: var(--white); }

footer {
  padding: 26px 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--paper-dim);
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- AI Console Dashboard ---------- */
.console-section {
  background: #0b1120;
  color: #e2e8f0;
  padding: 100px 0;
  font-family: 'Inter', sans-serif;
}
.console-header { margin-bottom: 40px; }
.console-eyebrow {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.console-header h2 { font-size: 2.2rem; color: #f8fafc; font-family: 'Inter', sans-serif; font-weight: 700; letter-spacing: -0.02em; }
.console-header p { color: #94a3b8; font-size: 1.05rem; margin-top: 8px; }

.console-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.console-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.console-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
}

.kpi-card { display: flex; flex-direction: column; justify-content: space-between; }
.kpi-title { font-size: 0.75rem; font-weight: 600; color: #94a3b8; letter-spacing: 0.05em; text-transform: uppercase; }
.kpi-value { font-size: 2.5rem; font-weight: 700; color: #f8fafc; margin: 12px 0; font-family: 'Sora', sans-serif; }
.kpi-dim { color: #64748b; font-size: 1.2rem; }
.kpi-trend { font-size: 0.8rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trend-up { color: #10b981; background: rgba(16, 185, 129, 0.1); padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.trend-vs { color: #64748b; }

.main-panel { grid-column: span 2; padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.panel-tag { display: inline-block; font-size: 0.7rem; color: #60a5fa; background: rgba(96, 165, 250, 0.1); padding: 4px 10px; border-radius: 100px; border: 1px solid rgba(96, 165, 250, 0.2); margin-bottom: 20px; align-self: flex-start; }
.main-panel h3 { font-size: 1.8rem; color: #f8fafc; line-height: 1.3; margin-bottom: 16px; font-family: 'Inter', sans-serif; font-weight: 600;}
.highlight-blue { color: #38bdf8; }
.main-panel p { color: #94a3b8; font-size: 0.95rem; line-height: 1.6; margin-bottom: 32px; }

.cv-tabs { display: flex; flex-direction: column; gap: 12px; }
.cv-tab {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}
.cv-tab:hover { background: rgba(56, 189, 248, 0.05); border-color: rgba(56, 189, 248, 0.3); color: #e2e8f0; }
.cv-tab.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: #38bdf8;
  color: #f8fafc;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2) inset;
}
.dot { display: block; width: 8px; height: 8px; border-radius: 50%; }
.dot-blue { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.dot-green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.dot-purple { background: #a855f7; box-shadow: 0 0 8px #a855f7; }
.dot-amber { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.highlight-blue { color: #38bdf8; }
.highlight-green { color: #10b981; }
.highlight-purple { color: #a855f7; }
.highlight-amber { color: #f59e0b; }
.leg-purple { background: #a855f7; box-shadow: 0 0 8px #a855f7; }

.chart-panel { grid-column: span 2; display: flex; flex-direction: column; padding: 24px; }
.chart-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.ch-left h4 { font-size: 1rem; color: #f8fafc; font-weight: 600; font-family: 'Inter', sans-serif; }
.ch-sub { font-size: 0.75rem; color: #64748b; margin-top: 4px; }
.ch-legend { display: flex; gap: 12px; font-size: 0.75rem; color: #94a3b8; }
.leg-item { display: flex; align-items: center; gap: 6px; }
.leg-dot { width: 8px; height: 8px; border-radius: 50%; }
.leg-blue { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.leg-green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.chart-container { flex-grow: 1; position: relative; min-height: 280px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  /* Nav */
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    right: 28px;
    background: #fff;
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 12px 30px -10px rgba(0,0,0,0.25);
    gap: 14px;
    z-index: 200;
  }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }

  /* Hero */
  .hero { padding: 130px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo-wrap { order: -1; }
  .hero-photo { width: 160px; height: 160px; border-radius: 20px; }
  .hero h1 { font-size: clamp(1.9rem, 6.5vw, 2.6rem); }
  .hero-sub { font-size: 1rem; max-width: 100%; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }

  /* Grids */
  .about-grid,
  .stack-groups,
  .card-grid,
  .feature-grid { grid-template-columns: 1fr; }

  /* Experience timeline */
  .tl-item { grid-template-columns: 1fr; gap: 4px; }
  .tl-when { font-size: 0.82rem; }

  /* Stack */
  .stack-groups { gap: 24px; }

  /* Contact */
  .contact-actions { flex-direction: column; align-items: center; gap: 12px; }
  .contact-actions .btn { width: 100%; max-width: 280px; justify-content: center; }
  .contact-links { gap: 16px; font-size: 0.85rem; }

  /* Section spacing */
  section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: clamp(1.5rem, 5vw, 1.9rem); }

  /* Wrap padding tighter on small screens */
  .wrap { padding: 0 18px; }

  /* Console */
  .console-grid { grid-template-columns: 1fr 1fr; }
  .main-panel, .chart-panel { grid-column: span 2; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat b { font-size: 1.3rem; }
  .hero-eyebrow { font-size: 0.72rem; }
  .nav-inner { padding: 14px 18px; }
  .card { padding: 22px; }
  .feature-card { padding: 26px; }
  
  /* Console */
  .console-grid { grid-template-columns: 1fr; }
  .main-panel, .chart-panel { grid-column: span 1; }
  .cv-tabs { flex-direction: column; gap: 8px; }
  .console-header h2 { font-size: 1.8rem; }
}
