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

:root {
  --bg:      #0a0a0f;
  --bg2:     #13131e;
  --bg3:     #16161f;
  --border:  rgba(168,85,247,0.12);
  --text:    #f0eeff;
  --muted:   #8880aa;
  --accent:  #a855f7;
  --accent2: #7c3aed;
  --green:   #34c759;
}

body.light {
  --bg:      #e8e5f0;
  --bg2:     #ddd9ec;
  --bg3:     #d4d0e6;
  --border:  rgba(124,58,237,0.16);
  --text:    #1a1230;
  --muted:   #5e5478;
  --accent:  #7c3aed;
  --accent2: #6d28d9;
  --green:   #16a34a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6%; height: 56px;
  background: rgba(from var(--bg) r g b / 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--border);
  transition: background 0.3s;
}

body:not(.light) nav { background: rgba(10,10,15,0.9); }
body.light nav       { background: rgba(248,247,255,0.9); }

.nav-right {
  display: flex; align-items: center; gap: 10px;
}

.theme-toggle {
  width: 34px; height: 34px; border-radius: 8px;
  background: transparent;
  border: 0.5px solid var(--border);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); background: rgba(168,85,247,0.08); }

/* Show moon in dark, sun in light */
body:not(.light) .icon-sun  { display: none; }
body.light        .icon-moon { display: none; }

.nav-logo img { height: 38px; display: block; }

.nav-links {
  display: flex; gap: 32px; list-style: none;
}

.nav-links a {
  text-decoration: none; color: var(--muted);
  font-size: 13px; font-weight: 300;
  position: relative; padding-bottom: 3px;
  transition: color 0.2s;
}

.nav-links a::after {
  content: ''; position: absolute;
  bottom: 0; left: 50%; width: 0; height: 1px;
  background: var(--accent); border-radius: 1px;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; left: 0; }
.nav-links a.active { color: var(--text); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
}
.hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--muted); border-radius: 2px;
}

.nav-right { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg3); border: 0.5px solid var(--border);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--accent); border-color: rgba(168,85,247,0.35); }

/* show moon in dark, sun in light */
.icon-sun  { display: none; }
.icon-moon { display: block; }
body.light .icon-sun  { display: block; }
body.light .icon-moon { display: none; }

.nav-links.open {
  display: flex; flex-direction: column;
  position: fixed; top: 56px; left: 0; right: 0;
  background: rgba(10,10,15,0.97);
  padding: 20px 6% 28px;
  border-bottom: 0.5px solid var(--border);
  gap: 0;
}
.nav-links.open li a {
  display: block; padding: 14px 0;
  font-size: 20px; font-family: 'DM Serif Display', serif;
  border-bottom: 0.5px solid var(--border);
}

/* ── HERO ── */
.hero {
  min-height: 90vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 80px 6% 60px;
}

.hero-photo {
  width: 150px; height: 150px;
  border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(168,85,247,0.35);
  margin-bottom: 28px;
}

.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 2%;
  transform: scale(1.35); transform-origin: center 18%;
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px;
  background: rgba(52,199,89,0.08);
  border: 0.5px solid rgba(52,199,89,0.2);
  border-radius: 20px; font-size: 12px;
  color: var(--green); margin-bottom: 24px;
}

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:.5; transform:scale(.8); }
}

.eyebrow {
  font-size: 11px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 400; line-height: 1.02;
  letter-spacing: -2px; margin-bottom: 20px;
}

.hero h1 em { font-style: italic; color: var(--muted); }

.subtitle {
  font-size: 16px; font-weight: 300; color: var(--muted);
  max-width: 500px; line-height: 1.75; margin-bottom: 40px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ── BUTTONS ── */
.btn-primary {
  padding: 13px 28px;
  background: var(--accent2); color: #fff;
  border: none; border-radius: 28px;
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--accent); }

.btn-ghost {
  padding: 13px 28px;
  background: transparent; color: var(--accent);
  border: 0.5px solid rgba(168,85,247,0.4);
  border-radius: 28px;
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s;
}
.btn-ghost:hover { background: rgba(168,85,247,0.08); }

/* ── METRICS ── */
.metrics {
  display: flex; flex-wrap: wrap;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  margin: 0 6%;
}

.metric {
  flex: 1; min-width: 120px;
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 20px;
  border-right: 0.5px solid var(--border);
}
.metric:last-child { border-right: none; }

.metric .num {
  font-family: 'DM Serif Display', serif;
  font-size: 40px; letter-spacing: -1px; line-height: 1;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 6px;
}
.metric .label { font-size: 12px; color: var(--muted); font-weight: 300; }

/* ── SECTION LABEL ── */
.section-label {
  font-size: 11px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 40px; display: flex;
  align-items: center; gap: 14px;
}
.section-label::after {
  content: ''; display: block;
  height: 0.5px; width: 40px;
  background: rgba(168,85,247,0.3);
}

/* ── WORK ── */
.work { padding: 80px 6%; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.card {
  display: block; text-decoration: none; color: inherit;
  background: var(--bg3); border: 0.5px solid var(--border);
  border-radius: 18px; overflow: hidden; position: relative;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  border-color: rgba(168,85,247,0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(124,58,237,0.12);
}

.card-img { width: 100%; aspect-ratio: 16/10; overflow: hidden; }
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  transition: transform 0.4s ease;
}
.card:hover .card-img img { transform: scale(1.04); }

.card-body { padding: 20px 20px 44px; }

.card-tag {
  font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
  display: block; margin-bottom: 8px;
}

.card-body h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px; font-weight: 400;
  letter-spacing: -0.4px; margin-bottom: 8px;
}

.card-body p { font-size: 13px; color: var(--muted); font-weight: 300; }

.arrow {
  position: absolute; bottom: 18px; right: 18px;
  width: 28px; height: 28px; border-radius: 50%;
  border: 0.5px solid rgba(168,85,247,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.card:hover .arrow { border-color: var(--accent); color: var(--accent); transform: rotate(45deg); }

/* ── ABOUT ── */
.about {
  padding: 80px 6%; border-top: 0.5px solid var(--border);
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
}

.about-text h2 {
  letter-spacing: -1.2px; line-height: 1.08; margin-bottom: 24px;
}
.about-text h2 em { font-style: normal; color: var(--accent); }

.about-text p {
  font-size: 15px; color: var(--muted);
  font-weight: 300; line-height: 1.8; margin-bottom: 16px;
}

.edu { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }

.edu-card {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: rgba(168,85,247,0.3); }

.edu-card strong { font-size: 14px; font-weight: 400; color: var(--text); }
.edu-card span   { font-size: 13px; color: var(--muted); font-weight: 300; }
.edu-card em     {
  font-style: normal; font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  background: rgba(168,85,247,0.08);
  border: 0.5px solid rgba(168,85,247,0.2);
  border-radius: 8px; padding: 2px 9px; width: fit-content; margin-top: 4px;
}

/* ── SKILLS ── */
.skills { padding-top: 40px; border-top: 0.5px solid var(--border); }

.skills-label {
  font-size: 11px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}

.skill { margin-bottom: 16px; }

.skill-info {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 7px;
}
.skill-info span:first-child { color: var(--text); font-weight: 300; }
.skill-info span:last-child  { color: var(--accent); font-size: 12px; }

.bar {
  height: 3px; background: rgba(168,85,247,0.1);
  border-radius: 3px; overflow: hidden;
}
.bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 3px; width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── CONTACT ── */
.contact {
  padding: 80px 6%; border-top: 0.5px solid var(--border);
  text-align: center;
}

.contact h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(36px, 5vw, 64px); font-weight: 400;
  letter-spacing: -1.5px; line-height: 1.08; margin-bottom: 16px;
}
.contact h2 em { font-style: italic; color: var(--accent); }
.contact-sub { font-size: 15px; color: var(--muted); font-weight: 300; margin-bottom: 48px; }

.contact-wrap {
  display: grid; grid-template-columns: 1fr 2fr; gap: 32px;
  text-align: left; max-width: 900px; margin: 0 auto;
}

.contact-info { display: flex; flex-direction: column; gap: 10px; }

.contact-info a {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--bg3);
  border: 0.5px solid var(--border); border-radius: 12px;
  text-decoration: none; color: var(--text); font-size: 14px;
  font-weight: 300; transition: border-color 0.2s, transform 0.2s;
}
.contact-info a:hover { border-color: rgba(168,85,247,0.35); transform: translateX(4px); }
.contact-info a span {
  display: block; font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 2px;
}
.contact-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 9px; background: rgba(168,85,247,0.08);
  border: 0.5px solid rgba(168,85,247,0.18);
  display: flex; align-items: center; justify-content: center;
}

/* ── FORM ── */
.form {
  background: var(--bg3); border: 0.5px solid var(--border);
  border-radius: 18px; padding: 28px;
}

.form h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px; font-weight: 400;
  letter-spacing: -0.4px; margin-bottom: 22px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field { margin-bottom: 14px; }

.field label {
  display: block; font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}

.field input, .field textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: 9px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 300;
  outline: none; resize: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(136,128,170,0.4); }
.field input:focus, .field textarea:focus {
  border-color: rgba(168,85,247,0.45);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.07);
}
.field input.error, .field textarea.error {
  border-color: rgba(255,69,58,0.5);
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%,100%{transform:translateX(0)} 30%{transform:translateX(-4px)} 70%{transform:translateX(4px)}
}

.form button {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff; border: none; border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  cursor: pointer; transition: opacity 0.2s;
  margin-top: 4px;
}
.form button:hover { opacity: 0.88; }
.form button:disabled { opacity: 0.5; cursor: not-allowed; }

.form-success {
  display: none; background: var(--bg3);
  border: 0.5px solid var(--border); border-radius: 18px;
  padding: 48px 28px; text-align: center;
  flex-direction: column; align-items: center; gap: 10px;
}
.form-success.show { display: flex; }

.success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(52,199,89,0.1);
  border: 0.5px solid rgba(52,199,89,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--green); margin-bottom: 8px;
}
.form-success h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px; font-weight: 400;
}
.form-success p { color: var(--muted); font-size: 14px; }

/* ── FOOTER ── */
footer {
  border-top: 0.5px solid var(--border);
  padding: 28px 6%; display: flex;
  justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
footer span { font-size: 12px; color: var(--muted); font-weight: 300; }
footer a { font-size: 12px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .cards { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about-text h2 { font-size: 34px; }
  .contact-wrap { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .metrics { flex-direction: column; }
  .metric { border-right: none; border-bottom: 0.5px solid var(--border); width: 100%; }
  .metric:last-child { border-bottom: none; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
