:root {
  --color-primary: #00c896;
  --color-accent: #0ea5e9;
  --color-dark: #0f1923;
  --color-light: #f0faf7;
  --color-text: #333;
  --color-muted: #666;
  --color-border: #e0e0e0;
  --font-main: 'Segoe UI', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,200,150,0.15);
  --shadow-md: 0 10px 20px rgba(0,200,150,0.25);
}

/* ============================================
   DARK MODE
   ============================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --color-light: #0f1923;
    --color-text: #e0e0e0;
    --color-muted: #aaa;
    --color-border: #2a2a3a;
    --color-card-bg: #1a2535;
  }

  body {
    background-color: var(--color-light);
    color: var(--color-text);
  }

  .hero,
  .projects-page {
    background-color: #1a2535;
  }

  .skill-card,
  .card,
  .contact-form {
    background-color: #1a2535;
    border-color: var(--color-border);
  }

  .contact-sidebar {
    background-color: #0d1f2d;
  }
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-light);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary);
}

a:focus, button:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ============================================
   NAVBAR
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  background-color: var(--color-dark);
  padding: 1rem 1.5rem;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.nav-brand {
  color: var(--color-primary);
  font-size: 1.4rem;
  font-weight: bold;
}

.nav-toggle {
  display: none;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.nav-links {
  display: none;
  list-style: none;
  flex-direction: column;
  width: 100%;
  padding: 0.5rem 0 1rem;
  gap: 0.25rem;
}

.nav-toggle:checked ~ .nav-links {
  display: flex;
}

.nav-links a {
  color: #ccc;
  padding: 0.5rem 0;
  display: block;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

/* ============================================
   BUTTONS
   ============================================ */
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-primary);
  color: white;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  color: white;
}

.button-outline {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.button-outline:hover {
  background-color: var(--color-primary);
  color: white;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  gap: 2rem;
  background-color: white;
  min-height: 80vh;
}

.hero-text h1 {
  font-size: 1.9rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.highlight {
  color: var(--color-primary);
}

.tagline {
  color: var(--color-muted);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.bio {
  max-width: 520px;
  margin: 0 auto 1.5rem;
  color: var(--color-text);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero-image img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-primary);
  margin: 0 auto;
}

/* ============================================
   SHARED SECTION STYLES
   ============================================ */
.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section-container h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.section-subtitle {
  color: var(--color-muted);
  margin-bottom: 2rem;
}


/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 1rem 0;
}
 
.gallery-grid figure {
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
}
 
.gallery-grid figure a {
  display: block;
  width: 100%;
  height: 100%;
}
 
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
 
.gallery-grid img:hover {
  transform: scale(1.05);
}
 
/* Lightbox — hidden by default */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 99;
}
 
/* Shown when its id matches the URL hash */
.lightbox:target {
  display: flex;
}
 
.lightbox img {
  max-width: 88vw;
  max-height: 80vh;
  border-radius: 8px;
  object-fit: contain;
}
 
/* Close button */
.lightbox a {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  text-decoration: none;
}
 
/* Responsive — 2 columns on small screens */
@media (max-width: 500px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ============================================
   SKILLS
   ============================================ */
.skills {
  background-color: var(--color-light);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.skill-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.skill-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.skill-card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-dark);
  font-size: 1.1rem;
}

.skill-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ============================================
   PROJECTS
   ============================================ */
.projects-page {
  background: linear-gradient(135deg, #0f1923 0%, #1a2535 100%);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background-color: white;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border-top: 4px solid var(--color-primary); 
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-primary); 
}

.card-tag {
  display: inline-block;
  background-color: rgba(0, 200, 150, 0.1);
  color: var(--color-primary);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-dark);
  font-size: 1.1rem;
}

.card p {
  color: var(--color-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.tag-html {
  background-color: rgba(0, 200, 150, 0.15);
  color: #00c896;
}

.tag-layout {
  background-color: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
}

.tag-javascript {
  background-color: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}

.tag-soon {
  background-color: rgba(156, 163, 175, 0.15);
  color: #6b7280;
}

.tag-contact {
  background-color: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-page {
  background: linear-gradient(135deg, #0f1923 0%, #1a2535 100%);
}

.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--font-main);
  width: 100%;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.15);
}

.contact-sidebar {
  background-color: var(--color-dark);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  border-top: 4px solid var(--color-primary);
}

.contact-sidebar h3 {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

.contact-sidebar p {
  color: #bbb;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.contact-info {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-info li {
  color: #ccc;
  font-size: 0.95rem;
}

.contact-info a {
  color: var(--color-primary);
}

.contact-info a:hover {
  text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  background-color: var(--color-dark);
  color: #aaa;
  font-size: 0.9rem;
  border-top: 3px solid var(--color-primary);
}

footer p {
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   TABLET (768px and above)
   ============================================ */
@media (min-width: 768px) {

  /* Nav: hide hamburger, show horizontal links */
  .hamburger {
    display: none;
  }

  .nav-links {
    display: flex !important;
    flex-direction: row;
    width: auto;
    padding: 0;
    gap: 2rem;
  }

  /* Skills: 2 columns */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Projects: 2 columns */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

/* ============================================
   DESKTOP (1024px and above)
   ============================================ */
@media (min-width: 1024px) {

  /* Hero: side by side */
  .hero {
    flex-direction: row;
    justify-content: center;
    text-align: left;
    padding: 5rem 4rem;
    gap: 4rem;
  }

  .hero-text {
    max-width: 550px;
  }

  .bio {
    margin: 0 0 1.5rem;
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .hero-image img {
    width: 280px;
    height: 280px;
    margin: 0;
  }

  /* Skills: 4 columns */
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Projects: 3 columns */
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Contact: form and sidebar side by side */
  .contact-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .contact-form {
    flex: 2;
  }

  .contact-sidebar {
    flex: 1;
  }

}

/* ============================================
   LARGE DESKTOP (1280px and above)
   ============================================ */
@media (min-width: 1280px) {

  .hero-text h1 {
    font-size: 3rem;
  }

  .hero-image img {
    width: 320px;
    height: 320px;
  }

  .section-container {
    padding: 4rem 2rem;
  }

}