/* ===== Tokens ===== */
:root,
[data-theme="dark"] {
  --bg: #09090b;
  --bg-elev: #0f0f12;
  --surface: rgba(255,255,255,0.04);
  --surface-border: rgba(255,255,255,0.08);
  --fg: #f4f4f5;
  --fg-muted: #a1a1aa;
  --accent: #6366f1;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(135deg, #818cf8 0%, #22d3ee 100%);
  --glow-1: rgba(99,102,241,0.18);
  --glow-2: rgba(34,211,238,0.12);
  --tag-bg: rgba(99,102,241,0.12);
  --tag-fg: #c7d2fe;
  --tag-border: rgba(99,102,241,0.25);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: 1160px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

[data-theme="light"] {
  --bg: #f3ece0;
  --bg-elev: #ece2d2;
  --surface: rgba(70,50,30,0.05);
  --surface-border: rgba(90,65,40,0.14);
  --fg: #2c2118;
  --fg-muted: #6b5d4d;
  --accent: #b5572c;
  --accent-2: #6f7d4a;
  --accent-grad: linear-gradient(135deg, #c1652f 0%, #7a8a4f 100%);
  --glow-1: rgba(193,101,47,0.16);
  --glow-2: rgba(122,138,79,0.16);
  --tag-bg: rgba(181,87,44,0.1);
  --tag-fg: #8a3f1c;
  --tag-border: rgba(181,87,44,0.22);
}

[data-theme="dark"] .btn-primary,
:root .btn-primary { color: #09090b; }
[data-theme="light"] .btn-primary { color: #fbf6ee; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 300ms var(--ease), color 300ms var(--ease);
}

a { color: inherit; text-decoration: none; }
ul { padding: 0; margin: 0; list-style: none; }
button { font-family: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 0%, var(--glow-1), transparent 60%),
    radial-gradient(700px circle at 90% 20%, var(--glow-2), transparent 60%);
  pointer-events: none;
  transition: background 300ms var(--ease);
}

.text-gradient {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 200ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
  border: 1px solid transparent;
  min-height: 44px;
}
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.btn-primary {
  background: var(--accent-grad);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--glow-1); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--surface-border);
  color: var(--fg);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--accent-2); transform: translateY(-1px); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  cursor: pointer;
  color: var(--fg);
  transition: border-color 200ms var(--ease), transform 200ms var(--ease);
}
.theme-toggle:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--surface-border);
  transition: background 300ms var(--ease);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 18px;
}
.logo span { color: var(--accent-2); }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--fg-muted);
}
.nav-links a { transition: color 200ms var(--ease); cursor: pointer; }
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: inline-flex; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 250ms var(--ease), opacity 250ms var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 24px;
  border-bottom: 1px solid var(--surface-border);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 4px;
  font-weight: 500;
  color: var(--fg-muted);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-menu .btn { margin-top: 8px; }

/* ===== Hero (full viewport split) ===== */
.hero {
  height: 100vh;
  min-height: 560px;
  max-height: 980px;
  display: flex;
  flex-direction: column;
  padding-top: 72px;
  overflow: hidden;
}
.hero-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 24px;
  overflow: hidden;
}
.hero-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.linkedin-btn svg { width: 18px; height: 18px; }
.linkedin-btn:hover {
  border-color: #0a66c2;
  color: #0a66c2;
  background: rgba(10,102,194,0.08);
}

.whatsapp-btn svg { width: 18px; height: 18px; }
.whatsapp-btn:hover {
  border-color: #25d366;
  color: #25d366;
  background: rgba(37,211,102,0.1);
}
.photo-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: var(--surface);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  color: var(--fg-muted);
  font-size: 13.5px;
  border: 1.5px dashed var(--surface-border);
  border-radius: var(--radius-lg);
  margin: 8px;
}
.photo-placeholder svg { width: 40px; height: 40px; opacity: 0.6; }
.photo-frame .glow-ring {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--accent-grad);
  opacity: 0.5;
  z-index: -1;
  filter: blur(18px);
}

.hero-text-col { max-width: 620px; }
.eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}
.hero-sub {
  font-size: 18px;
  color: var(--fg-muted);
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Client ticker + scroll cue, pinned to bottom of hero */
.hero-bottom { padding-bottom: 28px; }
.scroll-cue {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.scroll-cue button {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px;
}
.scroll-cue svg {
  width: 20px;
  height: 20px;
  animation: bounce 1.8s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}

.ticker {
  border-top: 1px solid var(--surface-border);
  overflow: hidden;
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: ticker-scroll 32s linear infinite;
}
.ticker-track span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--fg-muted);
  white-space: nowrap;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .scroll-cue svg { animation: none; }
}

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-elev); }
.section-eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin: 0 0 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 44px;
  max-width: 700px;
}
.body-text { color: var(--fg-muted); font-size: 17px; margin-bottom: 16px; max-width: 560px; }
.muted { color: var(--fg-muted); }

.glass {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

/* ===== Bento (Achievements) ===== */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.bento-card {
  padding: 28px;
  transition: transform 280ms var(--ease), border-color 280ms var(--ease);
}
.bento-card:hover { transform: translateY(-3px); border-color: var(--accent-2); }
.bento-lg { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
.bento-wide { grid-column: span 2; }
.stat {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}
.bento-lg .stat { font-size: 3rem; }
.stat-label { color: var(--fg-muted); font-size: 15px; margin: 0; }

/* ===== Two col / now card ===== */
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}
.now-card { padding: 32px; }
.now-card h3 { margin: 0 0 18px; font-size: 18px; }
.check-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
  color: var(--fg-muted);
  font-size: 15px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-grad);
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--surface-border);
}
.tl-item { position: relative; margin-bottom: 28px; }
.tl-marker {
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-content { padding: 26px 28px; }
.tl-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.tl-head h3 { margin: 0; font-size: 19px; }
.tl-date {
  font-size: 13px;
  color: var(--accent-2);
  font-weight: 600;
  white-space: nowrap;
}
.tl-org { color: var(--fg-muted); font-size: 14px; margin: 0 0 12px; }
.tl-content p { color: var(--fg-muted); margin: 0 0 10px; }
.tl-list { margin: 12px 0; }
.tl-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--fg-muted);
}
.tl-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent-2);
}
.tl-outcome {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-top: 12px;
}

.toggle-more {
  margin: 24px 0 0 28px;
}

.timeline-compact {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}
.tl-compact-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--surface-border);
}
.tl-compact-date { color: var(--accent-2); font-size: 13px; font-weight: 700; }
.tl-compact-role { font-size: 14.5px; font-weight: 600; }
.tl-compact-org { color: var(--fg-muted); font-size: 13.5px; text-align: right; }

/* ===== Grids ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  padding: 28px;
  transition: transform 280ms var(--ease), border-color 280ms var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--accent-2); }
.card h3, .card h4 { margin: 0 0 10px; font-size: 17px; }
.card p { color: var(--fg-muted); font-size: 14.5px; margin: 0; }

/* ===== Skills ===== */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-group { padding: 24px; }
.skill-group h4 { margin: 0 0 14px; font-size: 15px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-fg);
  border: 1px solid var(--tag-border);
}

/* ===== Education ===== */
.plain-list li { margin-bottom: 16px; font-size: 15px; }
.plain-list .muted { font-size: 13.5px; }

/* ===== Contact ===== */
.contact-section { text-align: center; }
.contact-card {
  padding: 64px 40px;
  max-width: 720px;
  margin: 0 auto;
}
.contact-card .section-title, .contact-card .body-text { margin-left: auto; margin-right: auto; }
.contact-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 28px 0 20px;
}
.location { font-size: 14px; }

/* ===== Inner page hero (Projects / Instagram) ===== */
.page-hero { padding: 160px 0 64px; }
.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.page-hero p { color: var(--fg-muted); font-size: 18px; max-width: 600px; }

/* ===== Projects grid ===== */
.idea-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding: 28px 32px;
}
.idea-banner p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
}
.idea-banner .btn { flex-shrink: 0; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-thumb {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--bg);
  background: var(--accent-grad);
  overflow: hidden;
}
.project-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-thumb .thumb-fallback { position: relative; z-index: 1; }
.project-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-body h3 { margin: 0; font-size: 18px; }
.project-status {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.project-status.status-active {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  border-color: rgba(34,197,94,0.3);
}
.project-status.status-progress {
  background: rgba(245,158,11,0.12);
  color: #f59e0b;
  border-color: rgba(245,158,11,0.3);
}
.project-status.status-delivered {
  background: var(--tag-bg);
  color: var(--tag-fg);
  border-color: var(--tag-border);
}
.project-body p { color: var(--fg-muted); font-size: 14.5px; margin: 0; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  color: var(--fg-muted);
}
.project-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== Instagram grid ===== */
.ig-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.ig-card { display: flex; flex-direction: column; }
.ig-embed-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  min-height: 420px;
}
.ig-embed-wrap iframe { width: 100%; border: none; }
.ig-placeholder {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--fg-muted);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}
.ig-placeholder svg { width: 36px; height: 36px; opacity: 0.5; }

@media (max-width: 1024px) {
  .projects-grid, .ig-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .projects-grid, .ig-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 140px 0 48px; }
}

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--surface-border); padding: 28px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-lg { grid-column: span 2; grid-row: span 1; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .hero-main {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 24px;
    overflow: visible;
  }
  .hero-photo-col { order: 2; gap: 12px; }
  .photo-frame { max-width: 130px; }
  .hero-text-col { order: 1; max-width: 100%; margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .linkedin-btn { font-size: 13px; padding: 9px 16px; }
}

@media (max-width: 640px) {
  .bento, .grid-3, .grid-4, .skills-grid { grid-template-columns: 1fr; }
  .bento-lg, .bento-wide { grid-column: span 1; }
  .tl-compact-item { grid-template-columns: 1fr; text-align: left; }
  .tl-compact-org { text-align: left; }
  .section { padding: 64px 0; }
  .toggle-more { margin-left: 0; }
  .photo-frame { max-width: 260px; }
  .ticker-track { gap: 36px; }
}
