/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #5f5d98;
  --accent-light: #E2E1F4;
  --accent-dark: #282845;
  --bg: #faf9f7;
  --bg-tint: #F7F5F5;
  --surface: #ffffff;
  --text-primary: #1a1917;
  --text-secondary: #5c5a56;
  --text-muted: #9c9a96;
  --border: rgba(26, 25, 23, 0.1);
  --font-sans: 'DM Sans', sans-serif;
  --font-serif: 'DM Serif Display', serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max-width: 1100px;
  --nav-height: 64px;
}

html { scroll-behavior: smooth; }

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

/* ─── NAV ───────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(250, 249, 247, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.02em;
  font-weight:bold;
}

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

.nav-links a {
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.5rem 1.125rem;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--accent-dark) !important; }

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  gap: 2rem;
  padding: calc(var(--nav-height) + 2rem) 2rem 4rem;
}

.hero-content {
  width: 100%;
  max-width: 38rem;
}

.hero-photo {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  min-height: 500px;
  align-self: start;
}

.hero-photo img {
  width: 100%;
  max-width: 400px;
  border-radius: 20%;
}

@media (max-width: 768px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: calc(var(--nav-height) + 2rem) 1.25rem 2rem;
    gap: 1.5rem;
    min-height: auto;
  }

  .hero-content {
    width: 100%;
    max-width: 38rem;
    margin: 0 auto;
  }

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

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

  .hero-photo {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    min-height: auto;
    align-self: center;
  }

  .hero-photo img {
    max-width: 100%;
  }
}

@media (min-width: 769px) {
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    text-align: left;
  }

  .hero-content {
    margin: 0;
    width: 100%;
    max-width: 38rem;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-photo {
    width: auto;
    max-width: none;
    justify-content: flex-end;
    align-self: start;
  }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  margin-bottom: 2rem;
  width: fit-content;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

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

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 14ch;
}

.hero-heading__intro,
.hero-heading__role,
.hero-accent {
  display: block;
}

.hero-heading__intro {
  white-space: nowrap;
}

.hero-accent {
  color: var(--accent);
  font-style: italic;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 52ch;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hero-scroll-hint span {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--text-muted));
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─── SECTIONS ───────────────────────────────────────────────── */
.section {
  padding: 6rem 2rem;
}

.section--tinted {
  background: var(--bg-tint);
}

.section > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto 3.5rem;
}

.section-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ─── PROJECTS ───────────────────────────────────────────────── */
.projects-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

#projects{
	padding-top:50px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 200px;  /* removes the top positioning */
  left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.project-card--featured::before {
  top: 320px;
}

.project-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.project-card:hover::before { transform: scaleX(1); }

.project-card--featured {
  grid-column: span 2;
  background: var(--accent-light);
  border-color: rgba(95, 93, 152, 0.2);
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

.project-card--featured::before { background: var(--accent); }

.project-card--featured .project-card__title {
  font-size: 1.5rem;
}

.project-card--featured .project-card__desc {
  max-width: 60ch;
}

.project-card__image {
  width: calc(100% + 4rem);
  height: 200px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: -2rem -2rem 1rem -2rem;
  background-color: #ffffff;
}

.project-card--featured .project-card__image {
  height: 320px;
  padding:20px 20px 0 20px;
}

.project-card__meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-dark);
  background: rgba(104, 102, 184, 0.12);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}

.project-card--featured .project-tag {
  background: rgba(95, 93, 152, 0.18);
}

.project-card__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--text-primary);
}

.project-card__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.project-card__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  margin-top: auto;
  transition: gap 0.2s;
  align-self: flex-start;
}

.project-card__link:hover { text-decoration: underline; }

/* ─── EXPERIENCE ─────────────────────────────────────────────── */
.experience-list {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.experience-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

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

.experience-item__left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.25rem;
}

.experience-year {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.experience-org {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.experience-title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
}

.experience-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.experience-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tint);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer {
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
}

.footer-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-email {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.footer-email:hover { text-decoration: underline; }

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links li:not(:last-child) { display: none; }

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

  .project-card--featured {
    grid-column: span 1;
    flex-direction: column;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .experience-item__left {
    flex-direction: row;
    gap: 1rem;
    align-items: baseline;
  }
}
