/* ===========================
   RESET & BASE
=========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.35s ease, color 0.35s ease;
}

/* ===========================
   THEME VARIABLES
=========================== */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --text: #0b0b0f;
  --text-muted: #6b7280;
  --border: rgba(0, 0, 0, 0.08);

  --accent: #5b5cff;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --max-width: 1120px;
}

body.dark {
  --bg: #0b0b0f;
  --bg-soft: #14151b;
  --text: #f5f7fb;
  --text-muted: #9aa0ad;
  --border: rgba(255, 255, 255, 0.08);
}

/* ===========================
   GLOBAL ELEMENTS
=========================== */
a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
  line-height: 1.65;
  color: var(--text-muted);
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

section {
  padding: 100px 20px;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ===========================
   NAVBAR
=========================== */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(
    to bottom,
    var(--bg) 60%,
    rgba(255, 255, 255, 0)
  );
}

body.dark .nav-wrapper {
  background: linear-gradient(
    to bottom,
    var(--bg) 60%,
    rgba(0, 0, 0, 0)
  );
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 600;
  font-size: 16px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

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

.nav-resume {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
}

#themeToggle {
  background: var(--bg-soft);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}

/* ===========================
   HERO
=========================== */
.hero {
  padding-top: 140px;
}

.hero-inner {
  max-width: 820px;
}

.hero-title {
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1.05;
}

.hero-title span {
  color: var(--accent);
}

.hero-subtitle {
  margin-top: 20px;
  max-width: 600px;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
}

.btn-primary {
  padding: 14px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 14px;
}

.btn-secondary {
  padding: 14px 22px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  font-size: 14px;
}

/* ===========================
   SECTION HEAD
=========================== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: 32px;
}

.section-head p {
  max-width: 420px;
  font-size: 14px;
}

/* ===========================
   PROJECTS GRID
=========================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project-card {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.project-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
}

.project-tag {
  font-size: 12px;
  color: var(--text-muted);
}

.project-footer a {
  font-size: 14px;
  color: var(--text);
}

/* ===========================
   ABOUT
=========================== */
.about-inner {
  max-width: 680px;
}

.about h2 {
  font-size: 32px;
  margin-bottom: 18px;
}

.about-list {
  margin-top: 24px;
  padding-left: 18px;
}

.about-list li {
  margin-bottom: 8px;
  color: var(--text-muted);
}

/* ===========================
   CONTACT
=========================== */
.contact-inner {
  max-width: 680px;
}

.contact h2 {
  font-size: 32px;
  margin-bottom: 18px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
}

.contact-links a {
  font-size: 14px;
  color: var(--text);
  background: var(--bg-soft);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  padding: 60px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===========================
   ANIMATIONS (SCROLL REVEAL)
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: 
    opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.show {
  opacity: 1;
  transform: none;
}

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

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

  .nav-links {
    display: none;
  }

  section {
    padding: 80px 16px;
  }

  .hero-title {
    font-size: clamp(36px, 8vw, 52px);
  }
}
