/* =============================================
   CSS Custom Properties
   ============================================= */
:root {
  --color-bg: #f9f9f7;
  --color-surface: #ffffff;
  --color-border: #e5e5e0;
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-accent: #2d3092;
  --color-accent-hover: #1e2170;

  --font: 'Inter', system-ui, sans-serif;
  --max-width: 860px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

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

ul {
  list-style: none;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

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

/* =============================================
   Navigation
   ============================================= */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* =============================================
   Hero
   ============================================= */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(70vh - var(--nav-height));
  text-align: center;
  padding: clamp(4rem, 10vw, 8rem) 1.5rem;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero-inner {
  max-width: var(--max-width);
}

.hero-label {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8ec5ff;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #ffffff;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.btn:hover {
  background: #f1f1ec;
  color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* =============================================
   Sections
   ============================================= */
.section {
  padding: clamp(2rem, 4vw, 3.5rem) 1.5rem;
}

.section--alt {
  background: var(--color-surface);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-inner--narrow {
  max-width: 560px;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

/* =============================================
   About
   ============================================= */
#about p {
  font-size: 1.05rem;
  color: var(--color-text);
  max-width: 680px;
}

/* =============================================
   Skills
   ============================================= */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skills-list li {
  padding: 0.35rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.skills-list li:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* =============================================
   Projects
   ============================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card-thumb {
  max-width: 160px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0.5rem 0 1rem;
}

.card-body {
  flex: 1;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--color-text);
}

.card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.card-link:hover {
  color: var(--color-accent-hover);
}

/* =============================================
   Contact
   ============================================= */
#contact > .section-inner > p {
  color: var(--color-muted);
  margin-bottom: 1.75rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.15s ease;
}

.contact-link:hover {
  color: var(--color-accent);
}

.contact-link svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

/* =============================================
   Footer
   ============================================= */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
}

/* =============================================
   Responsive — Mobile (< 640px)
   ============================================= */
@media (max-width: 639px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

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