/* ── TOKENS ── */
:root {
  --bg:        #0e0e0e;
  --surface:   #161616;
  --surface2:  #1f1f1f;
  --border:    #2a2a2a;
  --text:      #e8e8e8;
  --muted:     #888;
  --accent:    #e06c3a;
  --accent2:   #3a9e7e;
  --serif:     'Playfair Display', Georgia, serif;
  --sans:      'Inter', system-ui, sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 2.5rem; }
p  { color: var(--muted); font-weight: 300; }
a  { text-decoration: none; color: inherit; }

/* ── LAYOUT ── */
section {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* ── SECTION LABEL ── */
.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

/* ── NAVBAR ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2.5rem;
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.hero-content { max-width: 650px; }

.hero-tag {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1.5rem;
  display: block;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 700;
}
.hero-content h1 span { color: var(--accent); }

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 50ch;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn-primary {
  padding: 0.75rem 1.8rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-primary:hover {
  background: #c85a2a;
  transform: translateY(-2px);
}

.btn-outline {
  padding: 0.75rem 1.8rem;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 0.4rem;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-outline:hover {
  border-color: var(--text);
  color: var(--text);
  transform: translateY(-2px);
}

/* ── ABOUT ── */
#about { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: start;
}
.photo-placeholder {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 3rem;
  color: #fff;
  flex-shrink: 0;
}

.about-text p {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.8;
}
.about-text .btn-outline {
  margin-top: 0.5rem;
}

/* ── PROJECTS ── */
#projects { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.8rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: #3a3a3a;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.project-card:hover::before { transform: scaleX(1); }

.project-tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  display: block;
  margin-bottom: 0.9rem;
}

.project-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.project-card p {
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}
.project-tools span {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 2rem;
  color: var(--muted);
}

.project-links a {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-right: 1.2rem;
  transition: color 0.2s;
}
.project-links a:hover { color: #fff; }

/* ── SKILLS ── */
#skills { background: var(--surface); border-radius: 1rem; margin: 0 auto 2rem auto; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.8rem;
}

.skill-group h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-tags span {
  padding: 0.35rem 0.85rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 2rem;
  font-size: 0.82rem;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
  cursor: default;
}
.skill-tags span:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── CONTACT ── */
#contact { background: var(--bg); }

.contact-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
  max-width: 50ch;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.1rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.contact-item:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateX(5px);
}

.contact-icon {
  width: 38px; height: 38px;
  background: var(--surface2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--accent);
  border: 1px solid var(--border);
}

.contact-item span:last-child {
  font-size: 0.95rem;
  color: var(--text);
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
  .photo-placeholder { width: 90px; height: 90px; font-size: 2rem; }
  .nav-links { gap: 1.2rem; }
  .hero-content h1 { font-size: 2.8rem; }
}

/* ── SCROLL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── MOBILE ── */
@media (max-width: 768px) {

  #navbar {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1.2rem;
  }

  .nav-links a {
    font-size: 0.78rem;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .photo-placeholder {
    margin: 0 auto;
  }

  .about-text .btn-outline {
    display: block;
    text-align: center;
  }

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

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-links {
    max-width: 100%;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn-primary, .btn-outline {
    text-align: center;
  }

}

@media (max-width: 420px) {

  .nav-links {
    display: none;
  }

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

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

}