@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --accent:     #111111;
  --accent-dark:#000000;
  --dark:       #111111;
  --dark-card:  #1f1f1f;
  --light:      #f5f5f5;
  --light-card: #ffffff;
  --text-dark:  #eeeeee;
  --text-light: #1a1a1a;
  --muted:      #888888;
  --radius:     12px;
  --transition: 0.3s ease;
}

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; color: var(--text-light); background: var(--light); }
h1, h2, h3, h4, h5, h6 { font-family: 'DM Serif Display', serif; font-weight: 400; }
a { color: inherit; text-decoration: none; }

/* ── Navbar ────────────────────────────────────────────────── */
#mainNav {
  background: rgba(255,255,255,0.9);
  padding: 1.2rem 0;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}
#mainNav.scrolled {
  background: rgba(255,255,255,0.97);
  padding: 0.6rem 0;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
#mainNav .navbar-brand { font-size: 1.4rem; color: var(--accent); letter-spacing: 0.05em; }
#mainNav .nav-link {
  color: var(--text-light) !important;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.9rem !important;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: var(--accent) !important;
  background: rgba(0,0,0,0.06);
}

/* ── Hero shared ───────────────────────────────────────────── */
.hero-eyebrow {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.hero-cta .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  padding: 0.7rem 1.75rem;
  font-weight: 600;
  border-radius: 50px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.hero-cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.hero-cta .btn-outline-primary {
  padding: 0.7rem 1.75rem;
}
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}
.hero-scroll-hint a { color: rgba(0,0,0,0.3); font-size: 1.2rem; transition: color var(--transition); }
.hero-scroll-hint a:hover { color: var(--accent); }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero-a {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: #fff;
  overflow: hidden;
}
.hero-a-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding-top: 5rem;
  padding-bottom: 3rem;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto;
}
.hero-a-text {
  flex: 1;
}
.hero-a-accent-line {
  width: 56px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 1.5rem;
}
.hero-a-name {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 800;
  color: var(--text-light);
  line-height: 1;
  margin-bottom: 1.2rem;
}
.hero-a-subtitle {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-a-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-a-photo {
  flex: 0 0 360px;
  width: 360px;
}
.hero-a-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  background: #f0f0f0;
  border: 2px dashed #cccccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #aaaaaa;
  gap: 0.75rem;
  font-size: 0.88rem;
}
@media (max-width: 900px) {
  .hero-a-inner { flex-direction: column-reverse; gap: 2rem; }
  .hero-a-photo { flex: 0 0 auto; width: 200px; }
}

/* ── Section Shared ────────────────────────────────────────── */
.section-light  { background: var(--light);     color: var(--text-light); padding: 100px 0; }
.section-mid    { background: #f5f5f5; color: var(--text-light); padding: 100px 0; border-top: 4px solid #111111; }
.section-mid .section-label { color: #111111; }
.section-mid .section-title { color: var(--text-light); }
.section-mid .section-desc  { color: #555555; }
.section-dark   { background: var(--dark);       color: var(--text-dark);  padding: 100px 0; }
.section-contact{ background: var(--dark-card);  color: var(--text-dark);  padding: 100px 0; }

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.7;
}

/* ── About ─────────────────────────────────────────────────── */
.avatar-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  background: #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #aaaaaa;
  border: none;
}
.about-facts .fact {
  text-align: center;
  padding: 1rem;
}
.fact-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
}
.fact-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.btn-outline-primary {
  border-color: var(--accent);
  color: var(--accent);
  border-radius: 50px;
  font-weight: 600;
  padding: 0.6rem 1.8rem;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn-outline-primary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}


/* ── Case Study Cards ──────────────────────────────────────── */
.case-card {
  background: #1a1a1a;
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.25);
}
.case-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: #505560;
  padding: 0.22rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}
.case-card h4 { font-size: 1.15rem; font-weight: 700; color: var(--text-light); margin-bottom: 0.75rem; }
.case-card p  { font-size: 0.92rem; color: #555555; line-height: 1.7; flex: 1; }
.case-metrics {
  display: flex;
  gap: 1.2rem;
  margin: 1.2rem 0 1rem;
  padding: 0.8rem 1rem;
  background: rgba(122,171,138,0.12);
  border-radius: 8px;
  font-size: 0.88rem;
  color: #555555;
}
.case-metrics strong { color: #3a7a50; }
.case-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: #505560;
  transition: color var(--transition);
}
.case-link:hover { color: #303540; }

/* ── Case Studies stacked layout ──────────────────────────── */
.cs-stack { display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.cs-stack-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: center;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid #e5e5e5;
  width: 100%;
  max-width: 780px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cs-stack-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.cs-stack-item-reverse { direction: rtl; }
.cs-stack-item-reverse > * { direction: ltr; }
.cs-stack-photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: #f0f0f0;
  border: 2px dashed #cccccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #aaaaaa;
  gap: 0.5rem;
  font-size: 0.85rem;
}
img.cs-stack-photo-placeholder {
  display: block;
  object-fit: contain;
  background: #fff;
  border: 2px solid #111111;
}
.cs-stack-title {
  font-size: 1.6rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}
.cs-stack-text p { color: #555555; line-height: 1.7; margin-bottom: 0; }
@media (max-width: 768px) {
  .cs-stack-item { grid-template-columns: 1fr; direction: ltr; }
  .cs-stack-item-reverse { direction: ltr; }
}

/* ── Skill Cards ───────────────────────────────────────────── */
.skill-card {
  background: var(--dark-card);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  transition: border-color var(--transition), transform var(--transition);
}
.skill-card:hover {
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-4px);
}
.skill-icon {
  font-size: 2rem;
  color: #cccccc;
  margin-bottom: 1rem;
}
.skill-card h5 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 0.6rem; }
.skill-card p  { font-size: 0.85rem; color: #999999; line-height: 1.6; margin: 0; }

/* ── Photo placeholder ─────────────────────────────────────── */
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: #f0f0f0;
  border: 2px dashed #cccccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #aaaaaa;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.photo-placeholder-sm {
  aspect-ratio: 3 / 4;
}

/* ── Scroll fade-up animation ──────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── About divider ─────────────────────────────────────────── */
.about-divider {
  border-color: rgba(0,0,0,0.1);
  margin: 4rem 0 3rem;
}

/* ── Education ─────────────────────────────────────────────── */
.edu-card {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.8rem;
  border: 1px solid #e5e5e5;
  height: 100%;
  transition: transform var(--transition), box-shadow var(--transition);
}
.edu-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.edu-icon {
  width: 48px; height: 48px;
  min-width: 48px;
  border-radius: 10px;
  background: rgba(0,0,0,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 1.3rem;
}
.edu-card h5    { font-size: 1rem; font-weight: 700; color: var(--text-light); margin-bottom: 0.3rem; }
.edu-school     { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.edu-date       { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
.edu-detail     { font-size: 0.85rem; color: #555555; line-height: 1.6; margin: 0; }

/* ── Contact (slim) ────────────────────────────────────────── */
.section-contact-slim {
  background: var(--dark);
  padding: 2.5rem 0;
}
.contact-slim-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  width: 100%;
}
.contact-slim-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cccccc;
  margin-bottom: 0.25rem;
}
.contact-slim-text {
  font-size: 1rem;
  color: var(--text-dark);
  margin: 0;
}
.contact-slim-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.btn-outline-accent {
  border: 2px solid #cccccc;
  color: #cccccc;
  border-radius: 50px;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn-outline-accent:hover {
  background: #cccccc;
  color: var(--dark);
  transform: translateY(-2px);
}
.contact-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: #cccccc;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.contact-icon:hover {
  background: #fff;
  color: var(--dark);
  transform: translateY(-2px);
}

/* ── Contact (full — kept for other pages) ─────────────────── */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.social-links { display: flex; justify-content: center; gap: 1.5rem; }
.social-links a {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: #cccccc;
  transition: background var(--transition), transform var(--transition);
}
.social-links a:hover {
  background: #fff;
  color: var(--dark);
  transform: translateY(-3px);
}

/* ── Experience Timeline ───────────────────────────────────── */
.section-timeline {
  background: #fff;
  padding: 100px 0;
  border-top: 4px solid #111111;
}
.section-timeline .section-title { color: var(--text-light); }

.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
/* Vertical line through the center */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
  width: 2px;
  background: #e5e5e5;
  z-index: 0;
}

/* Each row */
.timeline-row {
  display: flex;
  align-items: flex-start;
  padding-bottom: 2.5rem;
  position: relative;
}
.timeline-row:last-child { padding-bottom: 0; }

/* Left and right columns — each exactly 50% */
.tl-left,
.tl-right {
  flex: 0 0 50%;
  min-width: 0;
}
.tl-left  { padding-right: 2rem; text-align: right; }
.tl-right { padding-left:  2rem; }

/* Dot — absolutely positioned on the center line */
.timeline-row::before {
  content: '';
  position: absolute;
  left: calc(50% - 7px);
  top: 1.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #111111;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #111111;
  z-index: 1;
}
.tl-edu::before {
  background: #fff;
  box-shadow: 0 0 0 2px #555555;
}

.timeline-card {
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-align: left;
}
.timeline-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3a7a50;
  background: rgba(122,171,138,0.12);
  border: 1px solid rgba(122,171,138,0.35);
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.6rem;
}
.timeline-tag-edu {
  color: #3a7a50;
  background: rgba(122,171,138,0.09);
  border-color: rgba(122,171,138,0.28);
}
.timeline-role {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}
.timeline-org {
  font-size: 0.88rem;
  color: #888888;
  margin-bottom: 0;
}
.timeline-detail {
  font-size: 0.88rem;
  color: #555555;
  margin: 0.5rem 0 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .timeline::before { left: 7px; margin-left: 0; }
  .timeline-row { display: block; padding-left: 2rem; }
  .timeline-row::before { left: 0; }
  .tl-left, .tl-right { flex: none; width: 100%; padding: 0; text-align: left; }
  .tl-left:empty, .tl-right:empty { display: none; }
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--dark);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  width: 100%;
}
footer > .container {
  display: block;
  width: 100%;
}
footer a { color: #cccccc; }
.footer-credit {
  text-align: center;
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .section-light, .section-dark, .section-contact { padding: 70px 0; }
}
