:root {
  --bg: #0a0f1e;
  --text: #edf2f7;
  --highlight: #00ffff;
  --warm: #d4a574;
  --nav-link: #8fa1b3;
  --card-bg: #111729;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.75;
}

h1, h2, h3, h4,
.nav-name,
.featured-header h3,
.card-content h3 {
  font-family: 'Space Grotesk', 'Helvetica Neue', sans-serif;
}

main {
  display: flex;
  flex-direction: column;
}

/* Sticky Nav */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background-color: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--highlight);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.hero {
  text-align: center;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.tagline {
  font-size: 1.1rem;
  color: var(--nav-link);
  margin-bottom: 0.75rem;
  max-width: 500px;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.highlight {
  color: var(--highlight);
}

.typing {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--nav-link);
}

.cursor {
  display: inline-block;
  animation: blink 0.7s infinite;
  color: var(--highlight);
}

@keyframes blink {
  50% { opacity: 0; }
}

.nav {
  list-style: none;
  display: inline-flex;
  gap: 2rem;
}

.nav a {
  color: var(--nav-link);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

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

.socials a {
  color: var(--nav-link);
  font-size: 1.75rem;
  margin: 0 1rem;
  transition: color 0.3s, transform 0.3s;
}

.socials a:hover {
  color: var(--highlight);
  transform: scale(1.1);
}

.section {
  padding: 80px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  scroll-margin-top: 60px;
}

@media (max-width: 768px) {
  .section {
    padding: 60px 20px;
  }
}

.section h2 {
  font-size: 2.25rem;
  color: var(--text);
  margin-bottom: 2rem;
  text-align: left;
  width: 100%;
  max-width: 1200px;
}

/* Featured Projects */
.featured-projects {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 3rem;
}

.featured-card {
  display: flex;
  flex-direction: row;
  background-color: var(--card-bg);
  border-radius: 0.75rem;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  border-left: 3px solid var(--highlight);
  transition: transform 0.3s, border-color 0.3s;
}

.featured-card:hover {
  transform: translateX(4px);
}

.featured-img-wrap {
  width: 280px;
  min-height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  background: #0d1220;
}

.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.featured-card:hover .featured-img-wrap img {
  transform: scale(1.05);
}

.featured-content {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.featured-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.featured-header h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 0;
}

.award-tag {
  font-size: 0.75rem;
  color: var(--warm);
  border: 1px solid var(--warm);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.featured-content p {
  line-height: 1.7;
  color: var(--nav-link);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .featured-card {
    flex-direction: column;
  }
  .featured-img-wrap {
    width: 100%;
    min-height: 180px;
    max-height: 220px;
  }
}

/* Secondary Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  width: 100%;
  max-width: 1200px;
}

.project-card {
  background-color: rgba(17, 23, 41, 0.6);
  border-radius: 0.5rem;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.card-content {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-content h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.card-content p {
  flex-grow: 1;
  line-height: 1.5;
  font-size: 0.85rem;
  color: var(--nav-link);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.badges span {
  background-color: rgba(0, 255, 255, 0.06);
  border: 1px solid rgba(0, 255, 255, 0.25);
  color: var(--highlight);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
}

.project-card .badges span {
  background-color: rgba(143, 161, 179, 0.08);
  border-color: rgba(143, 161, 179, 0.2);
  color: var(--nav-link);
}

.about-section {
  background-color: #0c1225;
}

.about-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  max-width: 1200px;
  width: 100%;
}

@media (min-width: 992px) {
  .about-wrapper {
    flex-direction: row;
  }
}

.about-left {
  flex: 1;
  text-align: center;
}

@media (min-width: 992px) {
  .about-left {
    text-align: left;
  }
}

.profile-glow {
  width: 260px;
  height: 320px;
  border-radius: 12px;
  padding: 6px;
  border: 2px solid rgba(212, 165, 116, 0.25);
  box-shadow: 0 0 30px rgba(212, 165, 116, 0.08);
  margin: 0 auto 2rem;
  position: relative;
  overflow: hidden;
}

.slideshow-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.profile-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.profile-slide.active {
  opacity: 1;
}

.about-left h2 {
  text-align: inherit;
  width: auto;
  max-width: none;
}

.about-intro {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.about-currently {
  margin-top: 1.5rem;
}

.about-currently h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--warm);
  margin-bottom: 0.75rem;
}

.about-currently ul {
  list-style: none;
  padding: 0;
}

.about-currently li {
  color: var(--nav-link);
  font-size: 0.95rem;
  padding: 0.3rem 0;
  padding-left: 1rem;
  position: relative;
}

.about-currently li::before {
  content: "~";
  position: absolute;
  left: 0;
  color: var(--warm);
}

.about-right {
  flex: 1.5;
}

.timeline {
  position: relative;
  padding-left: 30px;
  border-left: 4px solid var(--card-bg);
}

.timeline h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 2rem;
}

.timeline-events {
  list-style: none;
}

.timeline-event {
  position: relative;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.timeline-event.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--warm);
  border: 3px solid var(--bg);
}

.timeline-content h4 {
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: var(--nav-link);
}

.contact-section {
  text-align: center;
  padding-top: 40px;
  padding-bottom: 60px;
}

.contact-wrapper {
  max-width: 500px;
  margin: 0 auto;
}

.contact-wrapper h2 {
  text-align: center;
  width: auto;
  max-width: none;
  margin-bottom: 0.75rem;
}

.contact-wrapper p {
  font-size: 1.1rem;
  color: var(--nav-link);
  margin-bottom: 1.5rem;
}

.email-link {
  display: inline-block;
  color: var(--highlight);
  padding: 0.75rem 0;
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  transition: border-color 0.3s;
}

.email-link:hover {
  border-color: var(--highlight);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Hover overrides after reveal — restore snappy 0.3s transition */
.featured-card.reveal.is-visible:hover {
  transform: translateX(4px);
  transition: transform 0.3s;
}

.project-card.reveal.is-visible:hover {
  transform: translateY(-6px);
  transition: transform 0.3s;
}

/* Nav scroll state */
.site-nav {
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.site-nav.scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* Section padding variation */
@media (min-width: 769px) {
  #projects {
    padding-top: 100px;
  }
}

/* Mobile nav */
@media (max-width: 600px) {
  .site-nav {
    padding: 0.75rem 1.25rem;
  }
  .nav {
    gap: 1.25rem;
  }
  .nav a {
    font-size: 0.85rem;
  }
  h1 {
    font-size: 2.5rem;
  }
  .tagline {
    font-size: 0.95rem;
  }
  .typing {
    font-size: 1.2rem;
  }
  .section h2 {
    font-size: 1.75rem;
  }
}