/* ====== THEME (same core as original) ====== */
:root {
  --bg: #0b0c10;
  --surface: #121318;
  --elev: #171923;
  --text: #e6e6e6;
  --muted: #a9a9b3;
  --accent: #66fcf1;
  --border: #252736;
  --shadow: 0 10px 24px rgba(0,0,0,0.35);
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f6f7fb;
  --elev: #ffffff;
  --text: #1b1d29;
  --muted: #555a6a;
  --accent: #0ea5e9;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
  color: var(--text);
  background: linear-gradient(-45deg, #0b0c10, #121318, #171923, #0b0c10);
  background-size: 400% 400%;
  animation: gradientMove 20s ease infinite;
  line-height: 1.6;
}

/* ====== LAYOUT ====== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  background: linear-gradient(180deg, var(--surface), var(--elev));
  border-right: 1px solid var(--border);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow);
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .3px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #111827;
  font-weight: 800;
}
.brand-text { font-size: 1.05rem; color: var(--text); }

.nav {
  display: grid;
  gap: 8px;
}
.nav-link {
  position: relative;
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .08s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.03); border-color: var(--border); }
.nav-link.active { color: var(--text); background: rgba(102,252,241,.08); border-color: rgba(102,252,241,.35); }
.nav-link.active::before {
  content: '';
  position: absolute;
  left: -6px; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 3px;
  transform: scaleY(0);
  transform-origin: top;
  animation: growBar .3s ease forwards;
}

.sidebar-actions { margin-top: auto; display: flex; gap: 10px; }
.theme-toggle {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--elev);
  color: var(--text);
  cursor: pointer;
}

.content { margin-left: 280px; }

/* ====== SECTIONS ====== */
.section {
  min-height: 100vh;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(800px 500px at 80% 10%, rgba(102,252,241,.06), transparent 60%);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
.section.visible {
  opacity: 1;
  transform: translateY(0);
}
.section .section-inner {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 70px 0;
}

.section h1 {
  font-size: clamp(2.2rem, 1.5rem + 2.5vw, 3.2rem);
  margin: 0 0 16px;
  letter-spacing: .3px;
  color: var(--text); /* Explicitly set text color */
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2rem);
  letter-spacing: .2px;
}

.hero h1.typing {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeSlideUp 1.2s ease-out forwards;
}

.hero {
  /* This adds a dark overlay + the image */
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/bridge.jpg');
  background-size: cover;      /* Ensures image covers the whole section */
  background-position: center; /* Centers the image */
  background-repeat: no-repeat;
  color: white;                /* Ensures text is white on top of dark image */
}

#goals {
/* This adds a dark overlay + the image */
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/fuji.jpg');
  background-size: cover;      /* Ensures image covers the whole section */
  background-position: center; /* Centers the image */
  background-repeat: no-repeat;
  color: white;                /* Ensures text is white on top of dark image */

}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .hero h1.typing { animation: fadeSlideUp 1s ease-out forwards; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent);
  color: #0b0c10;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 6px 20px rgba(102,252,241,.25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 12px var(--accent), 0 0 30px rgba(102,252,241,.25); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); box-shadow: none; }
.btn.small { padding: 8px 12px; font-weight: 600; }

/* Pulse for example */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(102,252,241,0); }
  50% { box-shadow: 0 0 20px rgba(102,252,241,0.3); }
}
.btn.accent-pulse { animation: pulseGlow 3s infinite; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }

/* Work grid */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }

.card-img {
  width: 100%;
  height: 200px;       /* Sets a fixed height for uniformity */
  object-fit: cover;   /* Crops the image cleanly if aspect ratios differ */
  display: block;      /* Removes tiny gap often seen under images */
  border-bottom: 1px solid #eee; /* Optional separator line */
}

.card {
  overflow: hidden;
  grid-column: span 4;
  background: linear-gradient(180deg, var(--elev), var(--surface));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 25px rgba(0,0,0,0.4); }
.card-body { padding: 18px 18px 4px; }
.card-footer { padding: 0 18px 18px; display: flex; gap: 8px; }

/* Resume timeline */
.timeline { display: grid; gap: 16px; margin-top: 16px; }
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--elev);
  transition: transform .2s ease, background .2s ease;
}
.timeline-item:hover { transform: translateX(4px); background: #1a1d27; }
.time { color: var(--muted); }

/* Skills */
.skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.pill {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .9rem;
  transition: transform .2s ease, background .2s ease;
}
.pill:hover { transform: translateY(-2px); background: rgba(255,255,255,.06); }

/* Footer */
.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner {
  width: min(1100px, 92vw);
  margin: 0 auto;
  display: flex;
  gap: 12px;
  padding: 16px 0;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  background: var(--elev);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.icon-btn svg { transition: transform .2s ease; }
.icon-btn:hover { background: rgba(255,255,255,.03); color: var(--accent); }
.icon-btn:hover svg { transform: rotate(-5deg) scale(1.05); }
.tiny { width: min(1100px, 92vw); margin: 0 auto 40px; color: var(--muted); font-size: .85rem; }

/* ====== RESPONSIVE ====== */
@media (max-width: 980px) { .sidebar { width: 240px; } .content { margin-left: 240px; } .card { grid-column: span 6; } }
@media (max-width: 760px) {
  .sidebar { position: fixed; width: 100%; height: 64px; padding: 10px 12px; flex-direction: row; align-items: center; gap: 14px; }
  .brand-text { display: none; }
  .nav { grid-auto-flow: column; overflow-x: auto; white-space: nowrap; gap: 6px; -webkit-overflow-scrolling: touch; }
  .nav-link { padding: 8px 10px; }
  .sidebar-actions { display: none; }
  .content { margin-left: 0; padding-top: 64px; }
  .card { grid-column: span 12; }
  .timeline-item { grid-template-columns: 1fr; }
}

/* ====== KEYFRAMES ====== */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes growBar {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes blink { 50% { border-color: transparent; } }

/* ====== ACCESSIBILITY: Reduced Motion ====== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .section { opacity: 1; transform: none; }
}
