/* Custom Properties */
:root {
  --bg: #F7F3EE;
  --surface: #FFFFFF;
  --text: #1F1D1B;
  --text-secondary: #6B625B;
  --text-muted: #A39E98;
  --accent: #E07A5F;
  --accent-hover: #C96A52;
  --teal: #3D5A80;
  --border: #E6DED4;
  --success: #6B8F71;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --max-width: 1100px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-scroll: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Layout Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

@media (max-width: 768px) {
  section {
    padding: 70px 0;
  }
}

/* Typography */
h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }
}

h2 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 40px;
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
}

h3 {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
}

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

/* Link Underline Hover Animation */
.animated-link,
.hero-links a,
.project-links a,
.email-link,
.social-links a,
.nav-links a {
  position: relative;
  display: inline-block;
  transition: color var(--transition-normal);
}

.animated-link::after,
.hero-links a::after,
.project-links a::after,
.email-link::after,
.social-links a::after,
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: bottom left;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.animated-link:hover::after,
.hero-links a:hover::after,
.project-links a:hover::after,
.email-link:hover::after,
.social-links a:hover::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

/* SECTION 1: HEADER & NAVIGATION */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(247, 243, 238, 0.95);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.5px;
  text-transform: lowercase;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-transform: lowercase;
}

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

.btn-resume {
  background-color: var(--accent);
  color: #FFFFFF !important;
  border-radius: 6px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
}

.btn-resume::after {
  display: none !important;
}

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

/* Mobile Toggle & Fullscreen Menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.mobile-nav-links a {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 500;
  text-transform: lowercase;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
}

/* SECTION 2: HERO */
.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 800px;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
}

.cursor {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
}

.badge-dot {
  color: var(--success);
  font-size: 0.75rem;
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
}

.hero-links a {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--accent);
  font-size: 1rem;
}

/* SECTION 3: ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 6fr 4fr;
    gap: 48px;
  }
}

.about-text {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quick-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 14px;
  column-gap: 24px;
  font-size: 0.9rem;
  align-content: start;
}

.fact-label {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-weight: 400;
}

.fact-value {
  font-family: var(--font-body);
  color: var(--text);
  font-weight: 500;
}

/* SECTION 4: FEATURED WORK */
.projects-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 900px;
}

.project-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.project-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.project-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text);
}

.project-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.65;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: rgba(61, 90, 128, 0.08);
  color: var(--teal);
  border-radius: 4px;
  padding: 3px 10px;
  font-weight: 500;
}

.project-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 4px;
}

.project-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--accent);
}

/* SECTION 5: SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.skill-list {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}

/* SECTION 6: EXPERIENCE */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 900px;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.timeline-desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-top: 4px;
}

/* SECTION 7: CONTACT */
.contact-section {
  max-width: 800px;
}

.contact-desc {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.email-wrapper {
  margin-bottom: 32px;
}

.email-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--accent);
}

.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.social-links a {
  color: var(--text-secondary);
}

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

.dot-separator {
  color: var(--text-muted);
}

/* SECTION 8: FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

footer p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* SCROLL REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
