* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --text: #1f2937;
  --muted: #475569;
  --card: #ffffff;
  --nav: #0f172a;
  --nav-text: #ffffff;
  --link: #2563eb;
  --border: #dbe3ee;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body.dark {
  --bg: #0b1120;
  --text: #e5e7eb;
  --muted: #cbd5e1;
  --card: #111827;
  --nav: #020617;
  --nav-text: #ffffff;
  --link: #60a5fa;
  --border: #334155;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.navbar {
  background: var(--nav);
  padding: 16px 24px;
}

.nav-container {
  max-width: 1050px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.site-title a {
  color: var(--nav-text);
  font-weight: bold;
  font-size: 1.1rem;
}

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

.nav-links a {
  color: var(--nav-text);
  margin-left: 16px;
  font-size: 0.95rem;
}

.toggle-btn {
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 48px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.button-row {
  margin-top: 20px;
}

.button {
  display: inline-block;
  background: var(--link);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  margin-right: 12px;
  margin-bottom: 10px;
}

.button.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

body.dark .button.secondary {
  background: #334155;
  color: #f8fafc;
}

.headshot {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  text-decoration: none;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.project-card h3,
.info-card h3 {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--text);
}

.project-card p,
.info-card p {
  color: var(--muted);
}

.project-link-card {
  display: block;
}

.project-link-card:hover {
  text-decoration: none;
}

.project-page-image {
  width: 100%;
  max-width: 900px;
  border-radius: 16px;
  margin: 20px 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 30px 20px 50px;
}

ul {
  padding-left: 20px;
}

@media (max-width: 800px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-right {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    margin-left: 0;
    margin-right: 14px;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

.project-card img{
  width:100%;
  height:140px;
  object-fit:flex;
  background:white;
  padding:20px;
  border-radius:10px 10px 0 0;
  display:block;
  margin-bottom:12px;
}


.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}



.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}


/* =========================
   ROTATING SUBTITLE
========================= */
#rotating-text {
  color: #4f8cff;
  font-weight: 700;
  border-right: 2px solid currentColor;
  padding-right: 4px;
  white-space: nowrap;
  animation: blink-caret 0.8s step-end infinite;
}

@keyframes blink-caret {
  50% {
    border-color: transparent;
  }
}

/* =========================
   STATS ROW
========================= */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.stat-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  backdrop-filter: blur(6px);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.95rem;
  opacity: 0.85;
}

/* =========================
   SCROLL REVEAL
========================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}