/* ===========================
   CSS VARIABLES & RESET
   =========================== */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --surface: #ffffff;
  --surface-hover: #f0f0f0;
  --border: #e5e5e5;
  --border-light: #d4d4d4;
  --text: #1a1a1a;
  --text-muted: #525252;
  --text-dim: #a3a3a3;
  --accent: #7c3aed;
  --accent-dim: rgba(124, 58, 237, 0.08);
  --accent-hover: #6d28d9;
  --red: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Space Grotesk for headings, stats, labels */
h1, h2, h3,
.stat-number,
.metric-value,
.section-label span,
.hero-role,
.nav-links a,
.nav-mobile a,
.timeline-header h3,
.project-info h3,
.skill-group-header h3,
.section-title {
  font-family: 'Space Grotesk', sans-serif;
}

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

ul { list-style: none; }

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

/* ===========================
   SCROLLBAR
   =========================== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

/* ===========================
   NAVIGATION
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(255, 255, 255, 0.95);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  background: var(--accent) !important;
  color: var(--bg) !important;
  padding: 6px 16px !important;
  border-radius: 6px;
  font-weight: 500 !important;
  transition: background var(--transition-fast), transform var(--transition-fast) !important;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
}

/* Hamburger button */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-icon {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: background var(--transition-fast);
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  left: 0;
  transition: transform var(--transition);
}

.hamburger-icon::before { top: -7px; }
.hamburger-icon::after { top: 7px; }

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 16px 24px 20px;
  gap: 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.nav-mobile a {
  font-size: 16px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-mobile a:hover { color: var(--text); }

.nav-mobile.open { display: flex; }

/* ===========================
   HERO
   =========================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 100px 24px 100px;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.12) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
}

.hero-content {
  max-width: 700px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px 6px 10px;
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 32px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4cff91;
  box-shadow: 0 0 8px #4cff91;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 18px;
  margin-bottom: 12px;
  line-height: 1;
}

.hero-name {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  color: #1a1a1a;
  background: none;
  -webkit-text-fill-color: #1a1a1a;
}

.hero-role {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 10px;
  font-size: clamp(14px, 2.5vw, 20px);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 18px;
  color: #525252;
  font-weight: 400;
  margin-bottom: 0;
  letter-spacing: 0.2px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  /* Layout */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  /* Size */
  padding: 0 28px;
  height: 48px;
  min-width: 160px;

  /* Typography — reset everything that could shift text */
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-decoration: none;
  text-align: center;
  vertical-align: middle;

  /* Shape */
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  box-sizing: border-box;

  /* Behavior */
  cursor: pointer;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;

  /* Prevent any inherited margin/padding from ancestor */
  margin: 0;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

.btn-ghost {
  background: transparent;
  color: #525252;
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
  transform: translateY(-2px);
  background: var(--surface);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
}

.scroll-wheel {
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(0,0,0,0.2);
  border-radius: 13px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
  transition: border-color var(--transition);
}

.hero-scroll:hover .scroll-wheel {
  border-color: rgba(232, 255, 77, 0.5);
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: rgba(0,0,0,0.4);
  border-radius: 2px;
  animation: scroll-dot-fall 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.hero-scroll:hover .scroll-dot {
  background: var(--accent);
}

@keyframes scroll-dot-fall {
  0%   { opacity: 1; transform: translateY(0); }
  60%  { opacity: 0; transform: translateY(14px); }
  61%  { opacity: 0; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

.scroll-label {
  font-size: 12px;
  color: rgba(0,0,0,0.15);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  transition: color var(--transition);
}

.hero-scroll:hover .scroll-label {
  color: rgba(0,0,0,0.4);
}

/* ===========================
   SECTIONS
   =========================== */
.section {
  padding: 96px 24px;
}

.section-alt {
  background: #f8f8f8;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label ph-icon,
.section-label [class*="ph-"] {
  font-size: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 48px;
}

.section-title em {
  font-style: normal;
  color: var(--text-muted);
  font-weight: 300;
}

/* ===========================
   ABOUT
   =========================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
}

.about-bio {
  font-size: 18px;
  line-height: 1.8;
  color: #525252;
  margin-bottom: 48px;
  font-weight: 400;
}

.about-stats {
  display: flex;
  gap: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  font-weight: 400;
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 80px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.contact-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
  color: var(--text);
  transform: translateX(4px);
}

/* Case Study accent card */
.contact-card-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  margin-top: 4px;
}

.contact-card-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
  transform: translateX(4px);
}

.contact-card-accent [class*="ph-"] {
  color: var(--bg) !important;
}

.contact-card-accent .card-arrow {
  opacity: 1 !important;
  color: var(--bg);
}

.contact-card-accent:hover .card-arrow {
  transform: translate(2px, -2px);
}

.case-study-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.case-study-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.65;
}

.case-study-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.contact-card .card-arrow {
  margin-left: auto;
  opacity: 0;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.contact-card:hover .card-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.contact-card [class*="ph-"] {
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ===========================
   TIMELINE
   =========================== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 140px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.timeline-item:last-child { border-bottom: none; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: 136px;
  top: 40px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--border-light);
  transition: border-color var(--transition), background var(--transition);
}

.timeline-item:hover::before {
  border-color: var(--accent);
  background: var(--accent);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  padding-top: 2px;
}

.timeline-date {
  font-size: 12px;
  color: #737373;
  letter-spacing: 0.5px;
  font-weight: 500;
  white-space: nowrap;
}

.timeline-badge {
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.timeline-header [class*="ph-"] {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.timeline-header h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.timeline-header small {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 300;
}

.timeline-role {
  font-size: 12px;
  color: var(--text-dim);
  display: block;
  font-weight: 400;
}

.timeline-desc {
  font-size: 16px;
  color: #525252;
  margin-bottom: 16px;
  font-style: italic;
  line-height: 1.6;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #525252;
  line-height: 1.6;
  padding-left: 2px;
}

.timeline-list li::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  min-width: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  margin-top: 7px;
  flex-shrink: 0;
}

.timeline-list li strong {
  color: var(--text);
  font-weight: 500;
}

/* ===========================
   PROJECTS
   =========================== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.project-card:hover {
  border-color: var(--border-light);
}

.project-card.is-open {
  border-color: rgba(124, 58, 237, 0.15);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px;
  cursor: pointer;
  transition: background var(--transition-fast);
  gap: 16px;
}

.project-card-header:hover {
  background: var(--surface-hover);
}

.project-card-left {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.project-placeholder-icon {
  font-size: 28px;
  color: var(--accent);
  opacity: 0.7;
}

.project-info {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.project-tag {
  font-size: 12px;
  color: #737373;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-info h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 5px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  line-height: 1.25;
}

.project-info p {
  font-size: 14px;
  color: #525252;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
}

.project-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.project-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
  color: var(--text);
}

.project-card.is-open .project-toggle {
  border-color: rgba(232, 255, 77, 0.3);
  color: var(--accent);
}

.project-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-expand.open {
  max-height: 600px;
}

.project-expand-inner {
  padding: 0 24px 28px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.project-detail-grid h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
  font-family: 'Space Grotesk', sans-serif;
}

.project-detail-grid h4 [class*="ph-"] {
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.project-detail-grid p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.project-metrics {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.metric {
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 100px;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
  line-height: 1;
}

.metric-label {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

.project-values h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.project-values h4 [class*="ph-"] {
  font-size: 14px;
  color: var(--accent);
}

.project-values ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.project-values ul li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
  word-break: break-word;
}

.project-values ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}

/* ===========================
   SKILLS
   =========================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
}

.skill-group:nth-child(1) { border-radius: var(--radius); }
.skill-group:nth-child(2) { border-radius: var(--radius); }
.skill-group:nth-child(3) { border-radius: var(--radius); }
.skill-group:nth-child(4) { border-radius: var(--radius); }

.skill-group:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.skill-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.skill-group-header [class*="ph-"] {
  font-size: 22px;
  color: var(--accent);
}

.skill-group-header h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text);
  line-height: 1.3;
}

.skill-group ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-group ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #525252;
  line-height: 1.55;
  padding-left: 4px;
  transition: color var(--transition-fast);
}

.skill-group ul li::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  flex-shrink: 0;
  margin-top: 6px;
  transition: opacity var(--transition-fast);
}

.skill-group:hover ul li {
  color: #525252;
}

.skill-group:hover ul li::before {
  opacity: 1;
}

/* ===========================
   CONTACT
   =========================== */
.contact-section {
  background: var(--bg);
}

.contact-content {
  max-width: 700px;
}

.contact-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 300;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link-big {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.contact-link-big:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
  transform: translateX(6px);
}

.contact-link-big [class*="ph-"]:first-child {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-link-big > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-link-label {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}

.contact-link-value {
  font-size: 16px;
  color: var(--text);
  font-weight: 400;
}

.contact-link-big [class*="ph-"]:last-child {
  font-size: 18px;
  color: var(--text-dim);
  transition: color var(--transition), transform var(--transition);
}

.contact-link-big:hover [class*="ph-"]:last-child {
  color: var(--accent);
  transform: translate(4px, -4px);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 24px;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer span {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* ===========================
   REVEAL ANIMATIONS
   =========================== */

/* Word-by-word linear.app animation */
.hero-word {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(24px);
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-word.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Badge and subtitle fade-in */
#heroBadge, #heroSub, #heroScroll {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#heroBadge.visible, #heroSub.visible, #heroScroll.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Fallback: if JS fails or reduced motion, show everything */
@media (prefers-reduced-motion: reduce) {
  .hero-word, #heroBadge, #heroSub, #heroScroll {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

/* Scroll-triggered reveals for other sections */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.about-stats .stat:nth-child(1) { transition-delay: 0.1s; }
.about-stats .stat:nth-child(2) { transition-delay: 0.2s; }
.about-stats .stat:nth-child(3) { transition-delay: 0.3s; }

.skills-grid .skill-group:nth-child(1) { transition-delay: 0.05s; }
.skills-grid .skill-group:nth-child(2) { transition-delay: 0.1s; }
.skills-grid .skill-group:nth-child(3) { transition-delay: 0.15s; }
.skills-grid .skill-group:nth-child(4) { transition-delay: 0.2s; }

.timeline-item:nth-child(1) { transition-delay: 0.05s; }
.timeline-item:nth-child(2) { transition-delay: 0.1s; }
.timeline-item:nth-child(3) { transition-delay: 0.15s; }
.timeline-item:nth-child(4) { transition-delay: 0.2s; }

/* ===========================
   LOGOS
   =========================== */
.timeline-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}

.timeline-logo {
  height: 22px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity var(--transition);
  margin-bottom: 2px;
}

.timeline-item:hover .timeline-logo {
  opacity: 1;
}

.timeline-header h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
}

.timeline-header small {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 300;
}

.project-logo {
  height: 22px;
  width: auto;
  max-width: 70px;
  object-fit: contain;
  filter: brightness(0.8);
  transition: filter var(--transition);
}

.project-card:hover .project-logo,
.project-card.is-open .project-logo {
  filter: brightness(1);
}

/* +/- toggle icon */
.toggle-icon {
  display: block;
  position: relative;
  width: 14px;
  height: 14px;
}

.toggle-icon::before,
.toggle-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* horizontal bar — always visible */
.toggle-icon::before {
  width: 14px;
  height: 2px;
  top: 6px;
  left: 0;
}

/* vertical bar — visible when closed, rotates away when open */
.toggle-icon::after {
  width: 2px;
  height: 14px;
  top: 0;
  left: 6px;
  transform: scaleY(1);
  opacity: 1;
}

.project-card.is-open .toggle-icon::after {
  transform: scaleY(0);
  opacity: 0;
}

.project-card.is-open .toggle-icon::before {
  transform: rotate(0deg);
}

/* ===========================
   PHOSPHOR ICONS FIX
   =========================== */
ph-icon, [class^="ph-"], [class*=" ph-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

/* ===========================
   LINK ICONS (outline SVG)
   =========================== */
.link-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
  transition: color var(--transition-fast);
}

.contact-card-accent .link-icon {
  color: var(--bg);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-links {
    padding-top: 0;
  }
  .timeline::before { left: 0; display: none; }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .timeline-item::before { display: none; }
  .timeline-meta { flex-direction: row; align-items: center; gap: 12px; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-group:nth-child(1),
  .skill-group:nth-child(2),
  .skill-group:nth-child(3),
  .skill-group:nth-child(4) { border-radius: var(--radius); }
  .project-detail-grid { grid-template-columns: 1fr; }
  .project-values ul { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  /* Hide nav entirely on mobile */
  .nav { display: none; }

  /* Tighter vertical rhythm on mobile */
  .section { padding: 52px 20px; }
  .hero { padding: 80px 20px 100px; min-height: 100svh; }
  .section-title { font-size: 28px; margin-bottom: 24px; letter-spacing: -0.8px; }
  .hero-badge { margin-bottom: 20px; }
  .hero-title { margin-bottom: 12px; }
  .hero-sub { margin-bottom: 28px; font-size: 16px; }

  /* ---- TYPOGRAPHY: all body text → 16px on mobile ---- */

  /* Timeline */
  .timeline-header h3 { font-size: 18px; }
  .timeline-role { font-size: 13px; }
  .timeline-date { font-size: 13px; }
  .timeline-desc { font-size: 16px !important; }
  .timeline-list li { font-size: 16px !important; line-height: 1.65; }

  /* About */
  .about-bio { font-size: 16px !important; }

  /* Skills */
  .skill-group-header h3 { font-size: 17px; }
  .skill-group ul li { font-size: 16px !important; }

  /* Projects */
  .project-info p { font-size: 16px !important; }
  .project-detail-grid p { font-size: 16px !important; }
  .project-values ul li { font-size: 16px !important; }
  .metric-label { font-size: 13px; }

  /* Contact */
  .contact-sub { font-size: 16px !important; }
  .contact-link-value { font-size: 16px !important; }

  /* Buttons side by side — perfectly equal and centered */
  .hero-actions {
    flex-direction: row;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
  }
  .hero-actions .btn {
    flex: 1;
    min-width: 0;
    max-width: 180px;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
  }

  .about-stats { gap: 20px; flex-wrap: wrap; }
  .stat-number { font-size: 28px; }
  .project-card-header { padding: 16px; gap: 12px; }
  .project-card-left { gap: 12px; }
  .project-info h3 { font-size: 17px !important; }
  .project-info p { font-size: 14px !important; }
  .project-expand-inner { padding: 14px; }
  .project-metrics { gap: 8px; flex-wrap: wrap; }
  .project-values ul { grid-template-columns: 1fr; }
  .metric { min-width: 80px; }
  .footer .container { flex-direction: column; gap: 4px; text-align: center; }
  .contact-link-big { padding: 16px; }
  .hero-scroll { bottom: 36px; }
}

/* ===========================
   IMPACT — SPLIT VIEW + ACCORDION
   =========================== */

.impact-wrap {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 620px;
}

/* ── Desktop List (left) ── */
.impact-list {
  width: 320px;
  min-width: 320px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.impact-list-filler {
  flex: 1;
  background: var(--bg);
}

/* ── Desktop Detail (right) ── */
.impact-detail {
  flex: 1;
  overflow-y: auto;
  height: 100%;
  background: var(--bg);
}

.impact-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
}

.impact-list-item:last-child { border-bottom: none; }

.impact-list-item:hover { background: var(--surface-hover); }

.impact-list-item.active {
  background: rgba(124, 58, 237, 0.05);
  border-left: 3px solid var(--accent);
}

.impact-list-num {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  min-width: 20px;
  font-family: 'Space Grotesk', sans-serif;
}

.impact-list-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.impact-list-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  color: var(--text-dim);
}

.impact-list-meta { flex: 1; min-width: 0; }

.impact-list-category {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.impact-list-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Space Grotesk', sans-serif;
}

.impact-list-year {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.impact-list-arrow {
  font-size: 16px;
  color: var(--text-dim);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.impact-list-item.active .impact-list-arrow,
.impact-list-item:hover .impact-list-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.impact-detail-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 14px;
}

.impact-detail-empty i { font-size: 32px; opacity: 0.4; }

.impact-detail-panel {
  padding: 32px;
}

.impact-detail-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  background: var(--surface-hover);
  display: block;
}

.impact-detail-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
  gap: 8px;
}

.impact-detail-cat {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 6px;
}

.impact-detail-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 10px;
  font-family: 'Space Grotesk', sans-serif;
}

.impact-detail-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.impact-detail-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.impact-metrics {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.impact-metric {
  flex: 1;
  min-width: 80px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.impact-metric-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
  font-family: 'Space Grotesk', sans-serif;
}

.impact-metric-lbl {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

.impact-deliverables {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.impact-deliverable {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.impact-deliverable::before {
  content: '';
  width: 5px; height: 5px;
  min-width: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  margin-top: 6px;
  flex-shrink: 0;
}

.impact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.impact-tag-pill {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
}

/* ── Mobile Accordion ── */
.impact-accordion { display: none; }

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-item:last-child { border-bottom: none; }

.accordion-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.accordion-header:hover { background: var(--surface-hover); }

.accordion-header.open { border-bottom: 1px solid var(--border); }

.accordion-num {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  min-width: 18px;
  font-family: 'Space Grotesk', sans-serif;
}

.accordion-thumb {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.accordion-thumb-placeholder {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-dim);
  flex-shrink: 0;
}

.accordion-meta { flex: 1; min-width: 0; }

.accordion-cat {
  font-size: 11px; color: var(--text-dim);
  letter-spacing: 0.8px; text-transform: uppercase;
}

.accordion-title {
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
}

.accordion-toggle {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 14px; color: var(--text-dim);
  transition: all var(--transition-fast);
}

.accordion-toggle .acc-bar-h {
  display: block; width: 12px; height: 1.5px;
  background: currentColor; border-radius: 2px;
  position: relative;
}

.accordion-toggle .acc-bar-v {
  display: block; width: 1.5px; height: 12px;
  background: currentColor; border-radius: 2px;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.accordion-header.open .accordion-toggle { border-color: var(--accent); color: var(--accent); }
.accordion-header.open .acc-bar-v { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-body.open { max-height: 1200px; }

.accordion-content { padding: 20px; }

.accordion-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  background: var(--surface-hover);
  display: block;
}

.accordion-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  background: var(--surface-hover);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 13px; gap: 8px;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .impact-wrap {
    display: none;
  }
  .impact-accordion {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
}
