/* ── Google Fonts are loaded in HTML ── */

/* ══════════════════════════════════════
   CSS VARIABLES — LIGHT & DARK THEMES
══════════════════════════════════════ */
:root {
  --bg: #f8f7f4;
  --bg-alt: #f0ede8;
  --surface: #ffffff;
  --border: #e2ddd8;
  --text: #1a1713;
  --text-muted: #6b6560;
  --accent: #1a1713;
  --accent-hover: #3d3730;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 20px rgba(0,0,0,0.07);
  --card-shadow-hover: 0 8px 40px rgba(0,0,0,0.13);
  --nav-bg: rgba(248,247,244,0.85);
  --modal-overlay: rgba(0,0,0,0.5);
  --tag-bg: #ede9e4;
  --tag-color: #5a5450;
  --badge-bg: #1a1713;
  --badge-color: #f8f7f4;
}

[data-theme="dark"] {
  --bg: #0f0e0c;
  --bg-alt: #161512;
  --surface: #1c1b18;
  --border: #2e2c28;
  --text: #f0ede8;
  --text-muted: #8a857e;
  --accent: #e8e4de;
  --accent-hover: #ffffff;
  --card-bg: #1c1b18;
  --card-shadow: 0 2px 20px rgba(0,0,0,0.4);
  --card-shadow-hover: 0 8px 40px rgba(0,0,0,0.6);
  --nav-bg: rgba(15,14,12,0.85);
  --modal-overlay: rgba(0,0,0,0.75);
  --tag-bg: #2a2824;
  --tag-color: #a09890;
  --badge-bg: #e8e4de;
  --badge-color: #0f0e0c;
}

/* ══════════════════════════════════════
   RESET & BASE
══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--border); }

.nav-links .nav-cta {
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 500;
}

.nav-links .nav-cta:hover { background: var(--accent-hover); color: var(--bg); }

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}

.theme-toggle:hover { background: var(--border); }

[data-theme="light"] .moon { display: none; }
[data-theme="dark"] .sun { display: none; }

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 8px; font-weight: 500; color: var(--text-muted); border-radius: 8px; transition: color 0.2s; }
.mobile-menu a:hover { color: var(--text); }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.profile-photo-wrap {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 32px;
  border: 3px solid var(--border);
  box-shadow: var(--card-shadow);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  background: var(--accent);
  color: var(--bg);
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  animation: fadeUp 0.8s ease both;
}

.hero-name span { display: block; }

.hero-headline {
  max-width: 620px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 auto 40px;
  animation: fadeUp 0.8s 0.15s ease both;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.3s ease both;
}

.btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  display: inline-block;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }

.btn-dark {
  background: var(--accent);
  color: var(--bg);
  border: none;
}

.btn-dark:hover { background: var(--accent-hover); color: var(--bg); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover { border-color: var(--text); }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  font-size: 1.3rem;
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   SECTIONS
══════════════════════════════════════ */
.section { padding: 100px 24px; }
.section-alt { background: var(--bg-alt); }

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 56px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: -10px;
  width: 40px; height: 3px;
  background: var(--text);
  border-radius: 2px;
}

/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.8;
  text-align: justify;
}

.about-text p strong { color: var(--text); font-weight: 500; }

.about-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s, transform 0.3s;
}

.about-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-3px); }

.about-card-icon { font-size: 1.5rem; margin-bottom: 8px; }

.about-card h4 {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.about-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ══════════════════════════════════════
   SKILLS
══════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.skills-col-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.skill-list { display: flex; flex-direction: column; gap: 12px; }

.skill-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.skill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  flex-shrink: 0;
  margin-top: 8px;
}

/* ══════════════════════════════════════
   PROJECTS
══════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  cursor: pointer;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
  border-color: var(--text-muted);
}

.project-card-featured {
  border-color: var(--text-muted);
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-alt) 100%);
}

.project-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--badge-bg);
  color: var(--badge-color);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-icon { font-size: 2rem; margin-bottom: 12px; }

.project-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tag-color);
  background: var(--tag-bg);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.project-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.project-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.project-card:hover .project-more { opacity: 1; }

/* ══════════════════════════════════════
   CONTACT
══════════════════════════════════════ */
.contact-subtitle {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
  color: var(--text);
}

.contact-item:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  border-color: var(--text-muted);
}

.contact-icon { font-size: 1.4rem; flex-shrink: 0; }
.contact-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; letter-spacing: 0.05em; text-transform: uppercase; }
.contact-value { font-size: 0.9rem; font-weight: 500; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════
   MODAL
══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  max-width: 620px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.3s;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--tag-bg);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover { background: var(--border); }

.modal-icon { font-size: 2.5rem; margin-bottom: 12px; }

.modal-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tag-color);
  background: var(--tag-bg);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 24px;
  line-height: 1.25;
}

.modal-body p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.75;
}

.modal-body ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 2;
}

.modal-body h4 {
  font-weight: 600;
  font-size: 1rem;
  margin: 24px 0 10px;
  color: var(--text);
}

.modal-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links { display: none; }
  .hamburger { display: block; }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-side { flex-direction: row; flex-wrap: wrap; }
  .about-card { flex: 1; min-width: 140px; }

  .skills-grid { grid-template-columns: 1fr; gap: 32px; }

  .projects-grid { grid-template-columns: 1fr; }

  .modal { padding: 32px 24px; }
  .modal-title { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .hero-buttons { gap: 8px; }
  .btn { padding: 11px 20px; font-size: 0.9rem; }
}
