/* assets/css/layout.css */

/*
  Layout — page structure, grid, sections, spacing.
  No colors here — all colors come from variables.css
*/


/* Reset */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

a { color: inherit; }

ul { list-style: none; }


/* Nav */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

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


/* Page wrapper */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2.5rem;
}


/* Hero */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-3xl);
}


/* Sections */

section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) 2.5rem;
  border-top: 1px solid var(--border);
}


/* About grid — text left, stats right */

.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-2xl);
  align-items: start;
}

.about-body p {
  font-size: var(--text-base);
  font-weight: var(--fw-light);
  color: var(--muted);
  margin-bottom: 1rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.about-stats .stat:last-child:nth-child(odd) {
  grid-column: span 2;
}


/* Skills grid */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: var(--space-lg);
}


/* Projects grid */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  margin-top: var(--space-lg);
}


/* Profile image */

.profile-wrap {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.profile-img-col {
  flex-shrink: 0;
  width: 180px;
}

.profile-img {
  width: 180px;
  height: 220px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.profile-img-placeholder {
  width: 180px;
  height: 220px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg2);
}

.profile-content {
  flex: 1;
}


/* Resume banner */

.resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
  border-radius: var(--radius-lg);
  padding: var(--space-xl) 44px;
  margin-top: var(--space-lg);
}


/* Contact grid */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
  margin-top: var(--space-lg);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.02em;
}


/* Responsive */

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

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

  .profile-wrap {
    flex-direction: column;
  }

  .profile-img-col {
    width: 100%;
  }

  .profile-img,
  .profile-img-placeholder {
    width: 120px;
    height: 140px;
  }

  .resume-banner {
    flex-direction: column;
    padding: var(--space-xl) var(--space-lg);
  }

  section {
    padding: var(--space-2xl) 1.5rem;
  }
}

@media (max-width: 480px) {
  nav { padding: 0 1.5rem; }

  .hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .nav-links { display: none; }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
}


/* Hero two-column split — image left, text right */

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-3xl);
  min-height: 100vh;
}

.hero-img-col {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 0;
}

.hero-img {
  width: 100%;
  max-width: 420px;
  height: 480px;
  object-fit: cover;
  object-position: center top;
  border-radius: 20px;
  border: 1px solid var(--border);
  display: block;
}

.hero-img-placeholder {
  width: 100%;
  max-width: 380px;
  height: 450px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg2);
}

.hero-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 768px) {
  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-height) + var(--space-lg));
  }

  .hero-img-col { order: -1; }

  .hero-img,
  .hero-img-placeholder {
    max-width: 200px;
    height: 240px;
    margin: 0 auto;
  }

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

  .hero-sub { margin-left: auto; margin-right: auto; }
}