/* ==========================================================================
   ---------------------------- RESET & FONTS -------------------------------
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap");

:root {
  /* Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --accent: #d4af37;
  /* Gold/Bronze */
  --accent-glow: rgba(212, 175, 55, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-heading: "Playfair Display", serif;
  --font-body: "Manrope", sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* Layout */
  --page-width: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   ---------------------------- TYPOGRAPHY ----------------------------------
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: #fff;
}

h1 {
  font-size: clamp(3rem, 5vw, 5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 3vw, 3.5rem);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: var(--spacing-sm);
}

p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  font-weight: 300;
  max-width: 65ch;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: var(--spacing-sm);
}

/* ==========================================================================
   ---------------------------- LAYOUT UTILS --------------------------------
   ========================================================================== */

.page-container {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-xl) 0;
  min-height: 80vh;
  /* Make sections substantial */
  display: flex;
  /* Often needed for centering or aligning */
  flex-direction: column;
  justify-content: center;
}

/* ==========================================================================
   ---------------------------- NAVIGATION ----------------------------------
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  /* Dark transparent */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links li a {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.nav-links li a:hover {
  opacity: 1;
  color: var(--accent);
}

/* HAMBURGER (Mobile) */
.navbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.line {
  width: 24px;
  height: 2px;
  background-color: #fff;
  transition: all 0.3s ease;
}

/* ==========================================================================
   ---------------------------- HERO SECTION --------------------------------
   ========================================================================== */

#hero {
  min-height: 100vh;
  justify-content: center;
  align-items: flex-start;
  padding-top: 100px;
  /* Offset fixed header */
}

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

.hero-title {
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
}

.hero-title span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.5em;
  /* relative to parent h1 */
  font-family: var(--font-body);
  font-weight: 300;
  margin-top: 0.5rem;
}

.hero-description {
  font-size: 1.25rem;
  line-height: 1.8;
  margin-bottom: var(--spacing-lg);
  border-left: 1px solid var(--accent);
  padding-left: var(--spacing-md);
}

/* ==========================================================================
   ---------------------------- ABOUT SECTION -------------------------------
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.about-card {
  background: var(--bg-secondary);
  padding: var(--spacing-md);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.about-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.about-card h4 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 1rem;
}

.about-card p {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   ---------------------------- PROJECTS SECTION ----------------------------
   ========================================================================== */

.project-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.project-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-md);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-subtle);
  align-items: baseline;
}

.project-item:last-child {
  border-bottom: none;
}

.project-meta h3 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  color: var(--text-secondary);
}

.project-desc p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* ==========================================================================
   ---------------------------- SKILLS SECTION ------------------------------
   ========================================================================== */

.skills-wrapper {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(8, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-top: var(--spacing-md);
}

.skill-box {
  grid-column: span 2;
  background: var(--bg-primary);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.skill-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    var(--accent-glow) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-box:hover {
  background: var(--bg-secondary);
  z-index: 1;
}

.skill-box:hover::after {
  opacity: 1;
}

.skill-box i {
  font-size: 3.5rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
  z-index: 2;
}

.skill-box:hover i {
  color: var(--accent);
  transform: scale(1.1);
}

.skill-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  z-index: 2;
  color: var(--text-primary);
}

/* ==========================================================================
   ---------------------------- CONTACT SECTION -----------------------------
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
}

.contact-info p {
  margin-bottom: var(--spacing-md);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.contact-item {
  display: flex;
  flex-direction: column;
}

.contact-item span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.contact-item a {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #fff;
  word-break: break-all;
  /* Ensure long emails don't break layout on mobile */
}

.contact-item a:hover {
  color: var(--accent);
  transform: translateX(10px);
  display: inline-block;
  transition: all 0.3s ease;
}

/* ==========================================================================
   ---------------------------- FOOTER --------------------------------------
   ========================================================================== */

footer {
  padding: var(--spacing-lg) 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ==========================================================================
   ---------------------------- RESPONSIVE ----------------------------------
   ========================================================================== */

@media (max-width: 1024px) {
  :root {
    --spacing-xl: 6rem;
    --spacing-lg: 3rem;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-xl: 4rem;
    --spacing-lg: 2.5rem;
    --spacing-md: 1.5rem;
  }

  /* Adjust Hero for Mobile */
  .hero-title {
    font-size: 3.5rem;
  }

  .hero-description {
    padding-left: var(--spacing-sm);
    font-size: 1.1rem;
  }

  /* Navigation Mobile Logic */
  .navbar-hamburger {
    display: flex;
    z-index: 200;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 85%;
    max-width: 400px;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid var(--border-subtle);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    padding-bottom: 20%;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
    text-align: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-links li:first-child {
    border-top: 1px solid var(--border-subtle);
  }

  .nav-links li a {
    font-size: 1.25rem;
    display: block;
  }

  /* Grid Stack Updates */
  .about-grid {
    grid-template-columns: 1fr;
  }

  .project-item {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .project-meta h3 {
    font-size: 2rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .contact-item a {
    font-size: 1.5rem;
  }

  /* Skills Mobile */
  .skills-wrapper {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .skill-box {
    aspect-ratio: 1;
    /* Square on mobile for better fit */
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-md: 1rem;
  }

  .header {
    padding: 1rem 0;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-description {
    font-size: 1rem;
  }

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

  .skill-box i {
    font-size: 2.5rem;
  }

  .skill-name {
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   ---------------------------- ANIMATIONS ----------------------------------
   ========================================================================== */

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}
