:root {
  /* Default: Creamy (Warm) */
  --bg: #fdfbf7; 
  --surface: #f5f0e6; 
  --surface-hover: #ede6d6; 
  --primary: #b45309; 
  --text-main: #451a03; 
  --text-muted: #92400e; 
  --border: #e7e5e4; 
  --primary-glow: rgba(180, 83, 9, 0.2);
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  --bg: #0b1120; --surface: #1e293b; --surface-hover: #334155; --primary: #38bdf8; --text-main: #f8fafc; --text-muted: #94a3b8; --border: #334155; --primary-glow: rgba(56, 189, 248, 0.4);
}
[data-theme="light"] {
  --bg: #f8fafc; --surface: #ffffff; --surface-hover: #f1f5f9; --primary: #0284c7; --text-main: #0f172a; --text-muted: #64748b; --border: #e2e8f0; --primary-glow: rgba(2, 132, 199, 0.2);
}
[data-theme="matrix"] {
  --bg: #000000; --surface: #001100; --surface-hover: #002200; --primary: #00ff00; --text-main: #00ff00; --text-muted: #008800; --border: #003300; --font-sans: 'Courier New', monospace; --primary-glow: rgba(0, 255, 0, 0.4);
}
[data-theme="terminal"] {
  --bg: #050505; --surface: #000000; --surface-hover: #111; --primary: #00ff41; --text-main: #00ff41; --text-muted: #008f11; --border: #00ff41; --font-sans: 'JetBrains Mono', 'Courier New', monospace; --primary-glow: rgba(0, 255, 65, 0.3);
}
[data-theme="terminal"] .project-card, [data-theme="terminal"] .nav-bar, [data-theme="terminal"] .btn { border-radius: 0 !important; border-style: double !important; border-width: 3px !important; }
[data-theme="terminal"] .hero-image { border-style: double !important; border-radius: 0 !important; }

[data-theme="cyberpunk"] {
  --bg: #050505; --surface: #111; --surface-hover: #222; --primary: #00ff9f; --text-main: #00ff9f; --text-muted: #ff003c; --border: #ff003c; --primary-glow: rgba(0, 255, 159, 0.4);
}
[data-theme="elegant"] {
  --bg: #0a0a0a; --surface: #1a1a1a; --surface-hover: #2a2a2a; --primary: #d4af37; --text-main: #e0e0e0; --text-muted: #a0a0a0; --border: #d4af37; --font-sans: 'Georgia', serif; --primary-glow: rgba(212, 175, 55, 0.3);
}
[data-theme="miami"] {
  --bg: #2d1b4e; --surface: #1a0b2e; --surface-hover: #3d2b5e; --primary: #ff00c8; --text-main: #00e5ff; --text-muted: #ff00c8; --border: #ff00c8; --primary-glow: rgba(255, 0, 200, 0.4);
}
[data-theme="plain"] {
  --bg: #ffffff; --surface: #ffffff; --surface-hover: #eeeeee; --primary: #0000ee; --text-main: #000000; --text-muted: #555555; --border: #000000; --primary-glow: transparent; --font-sans: serif;
}
[data-theme="plain"] body { background-image: none !important; }
[data-theme="plain"] .project-card, [data-theme="plain"] .nav-bar { border-radius: 0 !important; backdrop-filter: none !important; box-shadow: none !important; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.03) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.03) 0%, transparent 25%);
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Typography --- */
h1, h2, h3 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-shadow: 0 0 8px var(--primary-glow);
}

/* --- Navigation --- */
.nav-bar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--bg);
  opacity: 0.95;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-main);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Theme Switcher */
.theme-switcher {
  background: var(--surface);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-sans);
}

/* --- Hero Section --- */
.hero-flex {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.hero-text {
  flex: 1;
}

.hero-image {
  width: 280px;
  height: 280px;
  border-radius: 20px;
  background: var(--surface);
  border: 4px solid var(--border);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-style: italic;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-tag {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--surface);
  transform: translateY(-2px);
}

/* --- Portfolio Grid --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.project-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 1.2rem;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  overflow: hidden;
}

.project-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-grow: 1;
}

.project-links {
  margin-top: 1.2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Timeline --- */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 2rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.45rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--primary);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* --- Blog --- */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-item {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

@media (max-width: 850px) {
  .hero-flex { flex-direction: column-reverse; text-align: center; gap: 2rem; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .nav-right { gap: 1rem; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 2.2rem; }
}
