/* ============================================================
   CSS Variables — Modern Warm Palette
   ============================================================ */
:root {
  /* Colors */
  --navy:        #003366;
  --navy-deep:   #001830;
  --navy-light:  #0a4a8a;
  --gold:        #C9943A;
  --gold-light:  #E8B865;
  --gold-pale:   #F5E6C8;

  /* Warm neutrals */
  --cream:       #FAF8F4;
  --warm-white:  #FFFFFF;
  --warm-50:     #F7F4EF;
  --warm-100:    #EDE9E1;
  --warm-200:    #DDD8CE;

  /* Text */
  --text-dark:   #1C1C1E;
  --text-body:   #3A3A3C;
  --text-muted:  #6B6B70;

  /* Typography */
  --font: 'Inter', system-ui, Arial, sans-serif;

  /* Layout */
  --max-width: 1080px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-hover: 0 12px 40px rgba(0,51,102,0.14), 0 4px 12px rgba(0,51,102,0.08);

  /* Transitions */
  --transition: 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--cream);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================================
   Navbar — Fixed top, shadow on scroll
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(0, 24, 48, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: box-shadow var(--transition), background-color var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 28px rgba(0,0,0,0.28);
  background-color: rgba(0, 20, 40, 0.99);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: rgba(255,255,255,0.78);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 3px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 1px;
  transition: width var(--transition);
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* ============================================================
   Hero Section — Premium feel
   ============================================================ */
.hero {
  /* Richer multi-stop gradient */
  background:
    linear-gradient(
      155deg,
      #001428 0%,
      #002650 35%,
      #003875 65%,
      #0a3d6e 100%
    );
  padding: 148px 2.5rem 110px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Layered background texture / glow accents */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 75% 35%, rgba(201,148,58,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 15% 75%, rgba(10,74,138,0.30) 0%, transparent 60%),
    radial-gradient(ellipse 35% 40% at 50% 10%, rgba(255,255,255,0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* Subtle noise-like pattern overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.012) 2px,
      rgba(255,255,255,0.012) 4px
    );
  pointer-events: none;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  position: relative;
  z-index: 1;
}

/* ---- Photo ---- */
.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid rgba(201,148,58,0.55);
  /* Multi-layer glow: warm gold glow + deep shadow */
  box-shadow:
    0 0 0 8px rgba(201,148,58,0.10),
    0 0 0 16px rgba(201,148,58,0.04),
    0 24px 64px rgba(0,0,0,0.45),
    0 8px 24px rgba(0,0,0,0.30);
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-photo img:hover {
  transform: scale(1.025) translateY(-3px);
  box-shadow:
    0 0 0 10px rgba(201,148,58,0.16),
    0 0 0 20px rgba(201,148,58,0.05),
    0 32px 72px rgba(0,0,0,0.50),
    0 8px 24px rgba(0,0,0,0.28);
}

/* ---- Text ---- */
.hero-text {
  flex: 1;
  max-width: 560px;
}

.hero-text h1 {
  font-size: clamp(2.6rem, 5.5vw, 3.6rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.hero-bio {
  font-size: 0.975rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.85;
  margin-bottom: 2.5rem;
}

/* ---- Buttons ---- */
.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy-deep);
  padding: 0.82rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  box-shadow:
    0 4px 18px rgba(201,148,58,0.40),
    0 1px 4px rgba(0,0,0,0.12);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 10px 28px rgba(201,148,58,0.50),
    0 2px 8px rgba(0,0,0,0.12);
  filter: brightness(1.07);
}

.btn-primary:active {
  transform: translateY(-1px) scale(1.00);
}

.btn-secondary {
  border: 1.5px solid rgba(255,255,255,0.30);
  color: rgba(255,255,255,0.85);
  padding: 0.82rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  display: inline-block;
  transition:
    border-color 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.btn-secondary:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
  background-color: rgba(201,148,58,0.09);
  transform: translateY(-3px);
}

.btn-secondary:active {
  transform: translateY(-1px);
}

/* ============================================================
   Section Divider — thin gold rule between sections
   ============================================================ */
.section-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--warm-200) 20%,
    var(--warm-200) 80%,
    transparent 100%
  );
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ============================================================
   Shared Section Styles
   ============================================================ */
.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 2.5rem;
}

.section-container h2 {
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2.75rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
  position: relative;
  padding-bottom: 1.1rem;
}

.section-container h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}

/* ============================================================
   Skills Section — warm white bg
   ============================================================ */
.skills {
  background-color: var(--warm-white);
}

.skills-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.skill-card {
  flex: 1;
  min-width: 220px;
  background-color: var(--warm-50);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.75rem 2rem;
  border: 1px solid var(--warm-100);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.skill-card h3 {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.skill-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.skill-card ul li {
  color: var(--text-body);
  font-size: 0.925rem;
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}

.skill-card ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* ============================================================
   Projects Section — cream bg (alternating)
   ============================================================ */
.projects {
  background-color: var(--cream);
}

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

.project-card {
  background-color: var(--warm-white);
  border-radius: var(--radius-md);
  padding: 1.85rem 1.85rem 2.1rem;
  border: 1px solid var(--warm-100);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
  position: relative;
  overflow: hidden;
}

/* Top accent bar reveals on hover */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--navy-light));
  opacity: 0;
  transition: opacity 0.24s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--warm-200);
}

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

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.project-tools {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1.1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.project-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-results li {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}

.project-results li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1.15;
  font-weight: 700;
}

/* ============================================================
   Contact Section — warm-50 bg (alternating)
   ============================================================ */
.contact {
  background-color: var(--warm-50);
}

.contact-intro {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
  line-height: 1.75;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--navy);
  color: rgba(255,255,255,0.88);
  padding: 0.82rem 1.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,255,255,0.06);
  transition:
    background-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

.contact-item:hover {
  background-color: var(--navy-light);
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 8px 24px rgba(0,51,102,0.28);
  color: #ffffff;
}

.contact-item:active {
  transform: translateY(-1px) scale(1.00);
}

.contact-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background-color: var(--navy-deep);
  color: rgba(255,255,255,0.38);
  text-align: center;
  padding: 2rem 2.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

/* ============================================================
   Responsiveness — Mobile-first, breakpoint at 768px
   ============================================================ */
@media (max-width: 768px) {

  /* Navbar */
  .nav-container {
    padding: 0 1.25rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

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

  /* Hero: stack photo above text, center everything */
  .hero {
    padding: 110px 1.5rem 72px;
  }

  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 2.25rem;
  }

  .hero-photo img {
    width: 175px;
    height: 175px;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-bio {
    margin: 0 auto 2.25rem;
    max-width: 440px;
  }

  .hero-links {
    justify-content: center;
  }

  /* Sections */
  .section-container {
    padding: 4.5rem 1.25rem;
  }

  .section-container h2 {
    text-align: center;
  }

  .section-container h2::after {
    left: 50%;
    transform: translateX(-50%);
  }

  /* Skills: full width */
  .skill-card {
    min-width: 100%;
  }

  /* Projects: single column */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* Contact: stack vertically */
  .contact-links {
    flex-direction: column;
  }

  .contact-intro {
    text-align: center;
  }

  .contact-item {
    justify-content: center;
  }
}

/* Mid-range screens */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-photo img {
    width: 195px;
    height: 195px;
  }

  .hero-container {
    gap: 3rem;
  }

  .section-container {
    padding: 5.5rem 2rem;
  }
}
