:root {
  --bg: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --card: #020617;
  --border: #334155;
  --accent: #38bdf8;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --text: #020617;
  --muted: #475569;
  --card: #ffffff;
  --border: #cbd5f5;
  --accent: #0284c7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0.1px;
}

h1, h2, h3 {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  letter-spacing: 0;
}

h1 {
  font-size: 2.2rem;
  font-weight: 600;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 700px;
}


button {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

section {
  margin-bottom: 60px;
}

h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 25px;
}

/* ---------- Flip Cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.flip-card {
  perspective: 1000px;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 220px;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.flip-front h3 {
  margin: 0 0 10px;
}

.flip-front p {
  color: var(--muted);
  font-size: 0.95rem;
}

.flip-back {
  transform: rotateY(180deg);
  text-align: center;
}

.flip-back p {
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.flip-back a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.footer {
  margin-top: 80px;
  font-size: 0.9rem;
  color: var(--muted);
}
/* Smaller card variant for side projects */
.flip-card.small .flip-inner {
  height: 170px;
}

.flip-card.small .flip-front h3 {
  font-size: 1.05rem;
}

.flip-card.small .flip-front p,
.flip-card.small .flip-back p {
  font-size: 0.85rem;
}

/* Side projects list */
.side-list {
  text-align: left;
  margin-top: 10px;
}

.side-list li {
  margin-bottom: 6px;
}

.side-list a {
  color: var(--accent);
  text-decoration: none;
}

