/* ================================
   Reset
   ================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================================
   Human / Calm Theme
   ================================ */
:root {
  --ink: #1f2933;
  --paper: #fffdf8;
  --sand: #f1e7d7;
  --coffee: #7a4a2e;
  --highlight: #ffb703;
  --accent: #e76f51;
  --muted: #6b7280;
  --border: #e5e0d8;
  --white: #ffffff;
}

/* ================================
   Base
   ================================ */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

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

/* ================================
   Navigation
   ================================ */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 253, 248, 0.95);
  backdrop-filter: blur(14px);
  z-index: 1000;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 2px 16px rgba(31, 41, 51, 0.08);
}

nav .container {
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--coffee);
  letter-spacing: -0.3px;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--coffee);
}

/* ================================
   Landing (Big + Spinning)
   ================================ */
.landing {
  min-height: 100vh;
  width: 100%;
  position: fixed;
  inset: 0;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  overflow: hidden;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.landing.scrolled {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.landing-content {
  text-align: center;
}

/* BIGGER + POP + SPIN */
.landing-content h1.duck {
  font-size: clamp(12rem, 24vw, 20rem); /* bigger than before */
  line-height: 1;
  margin-bottom: 0.6rem;
  display: inline-block;
  transform-origin: center;
  filter: drop-shadow(0 16px 0 rgba(255, 183, 3, 0.18));
  animation:
    duckPop 550ms cubic-bezier(0.2, 0.9, 0.2, 1) both,
    duckSpin 3.2s linear infinite;
}

/* pop in */
@keyframes duckPop {
  from { transform: scale(0.75); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* constant spin */
@keyframes duckSpin {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}

.landing-content .tagline {
  font-size: 1.15rem;
  color: var(--muted);
  font-weight: 500;
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 1.8rem;
  cursor: pointer;
  animation: nudge 2s infinite;
}

@keyframes nudge {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}

/* ================================
   Hero
   ================================ */
.hero {
  min-height: 100vh;
  background: var(--sand);
  display: flex;
  align-items: center;
  padding: 6rem 2rem 4rem;
  margin-top: 100vh; /* keeps hero below the fixed landing */
}

.hero .container {
  padding: 0 2rem;
}

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

.hero h1 {
  font-size: 4.8rem;
  font-weight: 900;
  margin-bottom: 1.2rem;
  letter-spacing: -1px;
}

.hero .subtitle {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: var(--ink);
  font-weight: 600;
}

.hero p {
  max-width: 620px;
  color: var(--muted);
  margin-bottom: 2.3rem;
}

/* Buttons */
.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.95rem 1.8rem;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  display: inline-block;
}

.btn-primary {
  background: var(--coffee);
  color: white;
}

.btn-primary:hover {
  background: #623a22;
  transform: translateY(-2px);
}

.btn-secondary {
  border: 2px dashed var(--coffee);
  color: var(--coffee);
  background: transparent;
}

.btn-secondary:hover {
  background: var(--coffee);
  color: white;
  transform: translateY(-2px);
}

/* ================================
   Section Transitions (Fixed)
   ================================ */
section:not(.landing) {
  padding: 6rem 2rem;
  background: var(--paper);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

section:not(.landing).visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 4rem;
  position: relative;
}

.section-title::after {
  content: "";
  width: 60px;
  height: 4px;
  background: var(--highlight);
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
}

/* ================================
   Achievements
   ================================ */
.achievements {
  background: #fbf4e7;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.achievement-card {
  background: var(--white);
  border-radius: 14px;
  padding: 2rem;
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.achievement-card:hover {
  transform: translateY(-4px);
  border-color: rgba(231, 111, 81, 0.35);
  box-shadow: 0 18px 36px rgba(31, 41, 51, 0.12);
}

.achievement-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,183,3,0.35);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.achievement-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.achievement-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.achievement-meta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--coffee);
  font-weight: 800;
}

/* FIXED: images look clean and consistent */
.achievement-image {
  width: 100%;
  height: 230px;            /* consistent height */
  object-fit: cover;        /* no stretching */
  display: block;
  border-radius: 10px;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
}

.achievement-image.lightbox-trigger {
  cursor: zoom-in;
}

/* ================================
   Projects
   ================================ */
.projects {
  background: var(--paper);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(122, 74, 46, 0.25);
  box-shadow: 0 18px 36px rgba(31, 41, 51, 0.12);
}

.project-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, rgba(255,183,3,0.2), rgba(231,111,81,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.project-content {
  padding: 2rem;
}

.project-content h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.project-content p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tech-tag {
  background: rgba(122, 74, 46, 0.08);
  color: var(--coffee);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  border: 1px solid rgba(122, 74, 46, 0.12);
}

/* ================================
   Experience
   ================================ */
.experience {
  background: #fbf4e7;
}

.timeline {
  max-width: 900px;
  margin: 3rem auto 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(122, 74, 46, 0.20);
  border-radius: 999px;
}

.timeline-item {
  padding-left: 70px;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-icon {
  position: absolute;
  left: 0;
  width: 44px;
  height: 44px;
  background: var(--highlight);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-content {
  background: var(--white);
  padding: 2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.timeline-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.timeline-content .company {
  color: var(--coffee);
  font-weight: 900;
  display: block;
  margin-bottom: 0.3rem;
}

.timeline-content .date {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.timeline-content ul {
  list-style: none;
}

.timeline-content li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.8rem;
  color: var(--muted);
}

.timeline-content li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
}

/* ================================
   Skills
   ================================ */
.skills {
  background: var(--paper);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-category {
  background: var(--white);
  padding: 2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.skill-category h3 {
  color: var(--coffee);
  font-weight: 900;
  margin-bottom: 1.2rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.skill-tag {
  background: rgba(255,183,3,0.15);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid rgba(255,183,3,0.18);
}

/* ================================
   Contact
   ================================ */
.contact {
  background: #fbf4e7;
  text-align: center;
}

.contact-content {
  max-width: 650px;
  margin: 0 auto;
}

.contact p {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.6rem;
  border-radius: 12px;
  background: var(--white);
  color: var(--coffee);
  font-weight: 900;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.contact-link:hover {
  background: var(--coffee);
  color: white;
  transform: translateY(-2px);
}

/* ================================
   Footer
   ================================ */
footer {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--paper);
}

/* ================================
   Lightbox
   ================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 51, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 2000;
  padding: 2rem;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(900px, 95vw);
  max-height: 85vh;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 900;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--coffee);
  color: var(--white);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
  nav .container {
    padding: 0 1.25rem;
  }

  nav ul {
    gap: 1.2rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero .subtitle {
    font-size: 1.25rem;
  }

  .landing-content h1.duck {
    font-size: clamp(10rem, 30vw, 14rem);
  }

  .achievement-image {
    height: 200px;
  }
}
