@import url('https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;600;700&display=swap');

:root {
  /* Soft Dark Theme (Quiet Luxury) */
  --bg-primary: #15161a;
  --bg-secondary: #1e1f26;
  --accent: #F15B40; /* Summer Red */
  --accent-hover: #fa6c52;
  --text-main: #f0f2f5;
  --text-muted: #8b92a5;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: blur(20px);
  --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.2);
  
  --transition-main: all 0.5s cubic-bezier(0.25, 1, 0.3, 1);
  --section-pad: clamp(80px, 10vw, 160px) 5vw;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Onest', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Onest', sans-serif;
  font-weight: 500;
  color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-main);
}

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

/* Utilities */
.container {
  max-width: 1300px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  font-family: 'Onest', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  font-family: 'Onest', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 8px; /* Softer radius matching reference */
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.btn:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--glass-border);
  color: #fff;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: #fff;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 5vw;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-main);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background-color: rgba(21, 22, 26, 0.85);
  backdrop-filter: var(--glass-blur);
  padding: 16px 5vw;
  border-bottom-color: var(--glass-border);
}

.header-logo img {
  height: 36px;
  opacity: 0.9;
  transition: var(--transition-main);
}

.site-header.scrolled .header-logo img {
  height: 28px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-family: 'Onest', sans-serif;
  font-size: 15px;
  color: var(--text-muted);
}

.nav-link:hover {
  color: var(--accent);
  transform: none;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: calc(120px + 10vw) 5vw 10vw;
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg-primary) 0%, rgba(21, 22, 26, 0) 100%);
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

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

.hero-pre-title {
  display: block;
  font-family: 'Onest', sans-serif;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Intro Section */
.intro {
  padding: var(--section-pad);
  background: var(--bg-secondary);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.intro-image {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.intro-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
}

.intro-title {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 32px;
}

.intro-text p {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 24px;
}

/* Focus Stacking Sticky Cards */
.focus-stacking {
  padding: var(--section-pad);
  padding-bottom: 20vh;
}

.focus-header {
  margin-bottom: 64px;
  max-width: 600px;
}

.focus-title {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 24px;
}

.focus-desc {
  color: var(--text-muted);
  font-size: clamp(16px, 2vw, 18px);
}

.stack-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.stack-card {
  position: sticky;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 -15px 40px rgba(0,0,0,0.4);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  height: 60vh;
  min-height: 400px;
}

.stack-card:nth-child(1) { top: 120px; z-index: 1; }
.stack-card:nth-child(2) { top: 140px; z-index: 2; }
.stack-card:nth-child(3) { top: 160px; z-index: 3; }
.stack-card:nth-child(4) { top: 180px; z-index: 4; }
.stack-card:nth-child(5) { top: 200px; z-index: 5; }

.stack-image {
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.stack-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack-content {
  padding: 20px 0;
}

.stack-num {
  font-family: 'Onest', sans-serif;
  color: var(--accent);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  display: block;
  margin-bottom: 16px;
}

.stack-content h3 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
}

/* Projects Section */
.projects {
  padding: var(--section-pad);
  background: var(--bg-secondary);
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 40px;
}

.project-card {
  position: relative;
  display: block;
}

.project-img-wrap {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
  background: var(--bg-primary);
}

.project-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.3, 1), opacity 0.5s;
  opacity: 0.7;
}

.project-card:hover .project-img-wrap img {
  transform: scale(1.03);
  opacity: 1;
}

.project-meta {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-title {
  font-size: 24px;
  margin-bottom: 12px;
}

.project-desc {
  color: var(--text-muted);
  font-size: 15px;
}

/* Contact Action Section */
.contact-action {
  padding: var(--section-pad);
  text-align: center;
  position: relative;
}

.contact-box {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 80px) clamp(20px, 4vw, 40px);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.contact-title {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 24px;
}

.interaction-form {
  text-align: left;
  margin-top: 40px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-family: 'Onest', sans-serif;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input, 
.form-group textarea {
  width: 100%;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: 'Onest', sans-serif;
  outline: none;
  transition: var(--transition-main);
}

.form-group input:focus, 
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.contact-info {
  margin-top: 32px;
  color: var(--text-muted);
  font-size: clamp(14px, 2vw, 16px);
}

.contact-info a {
  color: var(--accent);
}


/* Footer */
.footer {
  padding: 60px 5vw;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
}

.footer-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 60px;
  align-items: center;
  margin-bottom: 60px;
}

.footer-logo {
  height: 30px;
  opacity: 0.8;
}

.footer-text {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 400px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--glass-border);
  padding-top: 30px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Reveal Animation */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.3, 1);
}

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

/* Responsive Overrides */
@media (max-width: 992px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-bg {
    width: 100%;
    opacity: 0.3;
  }
  
  .hero-bg::before {
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(21,22,26,0.6) 100%);
  }

  .nav-links {
    display: none; /* Hide on smaller screens for simplicity here */
  }

  .projects-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .stack-card {
    grid-template-columns: 1fr;
    height: auto;
    gap: 24px;
    padding: 32px 24px;
  }
  
  .stack-image {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .footer-top img {
    margin: 0 auto;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .stack-card:nth-child(n) {
    top: 80px; /* Reduced sticky top offset for smaller mobile screens */
  }
}
