:root {
  --primary-color: #2b5876;
  --primary-dark: #1e3c72;
  --accent-color: #ff6b6b;
  --text-dark: #2d3748;
  --text-muted: #718096;
  --bg-light: #f7fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
}

/* Layout Containers */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Widen Container for Projects Section */
#projects .container {
  max-width: 1440px;
}

.text-center {
  text-align: center;
}

.section {
  padding: 5rem 0;
}

.bg-light {
  background-color: var(--bg-light);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* Navigation - Extreme Left and Right Alignment */
.navbar {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  width: 100%;
}

.nav-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
}

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

.nav-links a.active-nav {
  color: var(--primary-color);
  font-weight: 700;
}

/* Hero Section - Top Left Alignment with White Text */
.hero {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 6rem 2rem 2rem 5rem;
  background: url('Photos/31.jpg') no-repeat center center / cover;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  box-sizing: border-box;
  color: #ffffff;
}

.hero-content {
  max-width: 600px;
  margin: 0;
}

.sub-greeting {
  display: block;
  font-size: 1.2rem;
  color: #ffffff;
  opacity: 0.95;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-title {
  font-size: 3.5rem;
  margin: 0.5rem 0 1rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero-tagline {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 0 2rem 0;
  color: #f7fafc;
  opacity: 0.95;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

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

/* Video Hero Section */
.video-hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

.video-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.55);
  z-index: 2;
}

.video-hero-content {
  position: relative;
  z-index: 3;
  color: #ffffff;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background-color: #e65252;
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid #ffffff;
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.btn-outline-white:hover {
  background-color: #ffffff;
  color: var(--primary-dark);
  transform: translateY(-2px);
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: start;
}

.about-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 1.75rem;
  border-radius: 12px;
}

.about-card h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}

.meta-list {
  list-style: none;
}

.meta-list li {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.about-narrative p {
  margin-bottom: 1.25rem;
  color: var(--text-dark);
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--primary-dark);
  background: #edf2f7;
}

.tab-btn.active {
  color: #ffffff;
  background: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Education & Experience Entries */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.entry-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.entry-title {
  font-size: 1.25rem;
  color: var(--primary-dark);
}

.entry-sub {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.entry-date {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
  white-space: nowrap;
}

.entry-bullets {
  padding-left: 1.2rem;
  margin-top: 0.75rem;
}

.entry-bullets li {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.coursework {
  font-size: 0.9rem;
  color: var(--text-dark);
  margin-top: 0.5rem;
}

/* Projects Grid - 4-Column Layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.project-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #0f172a;
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-card:hover .project-img-wrapper img {
  transform: scale(1.05);
}

.project-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
  line-height: 1.5;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tag {
  background: #edf2f7;
  color: #4a5568;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

.project-link-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.project-card:hover .project-link-label {
  color: var(--accent-color);
  transform: translateX(4px);
}

/* Edge-to-Edge Full Bleed Photo Gallery */
.gallery-section {
  width: 100vw;
  max-width: 100%;
  padding: 4rem 0 0 0;
  margin: 0;
  background-color: var(--bg-white);
  overflow-x: hidden;
}

.gallery-header {
  padding: 0 1.5rem 2rem;
}

.fullscreen-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100vw;
  max-width: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
}

.fullscreen-gallery-item {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background-color: #1a202c;
}

.fullscreen-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform 0.5s ease;
}

.fullscreen-gallery-item:hover img {
  transform: scale(1.04);
}

/* Contact */
.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fullscreen-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-container {
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 5rem 1.5rem 2rem;
    text-align: center;
    justify-content: center;
    align-items: center;
  }

  .hero-tagline {
    margin: 0 auto 2rem auto;
  }

  .hero-title {
    font-size: 2.5rem;
  }

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

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

  .entry-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .fullscreen-gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

.entry-card.reveal,
.project-card.reveal {
  transition-duration: 0.6s;
}