:root {
  /* Light theme */
  --page-bg: #f6f0e6;
  --card-bg: #fdf7ee;
  --text-main: #1f2933;
  --text-muted: #6b7280;
  --accent: #f28b5c;
  --nav-bg: #ffffff;
  --nav-border: rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
}

/* Dark theme overrides */
html[data-theme="dark"] {
  --page-bg: #050816;
  --card-bg: #0f172a;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #f28b5c;
  --nav-bg: rgba(15, 23, 42, 0.98);
  --nav-border: rgba(148, 163, 184, 0.3);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.65);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--page-bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: var(--text-main);
  display: flex;
  justify-content: center;
}

/* Layout wrapper */
.page {
  width: 100%;
  max-width: 1120px;
  padding: 2.5rem 2rem 6rem; /* extra bottom for nav */
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  right: 1.75rem;
  top: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 40;
}

html[data-theme="dark"] .theme-toggle {
  background: rgba(15, 23, 42, 0.96);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--text-main);
  stroke-width: 1.6;
}

/* Show/hide icons */
.icon-sun,
.icon-moon {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

html[data-theme="light"] .icon-sun {
  opacity: 1;
  transform: scale(1);
}
html[data-theme="light"] .icon-moon {
  opacity: 0;
  transform: scale(0.6);
}
html[data-theme="dark"] .icon-sun {
  opacity: 0;
  transform: scale(0.6);
}
html[data-theme="dark"] .icon-moon {
  opacity: 1;
  transform: scale(1);
}

/* Hero section */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% - 50% */
  min-height: 80vh;               /* hero feeling */
  align-items: center;
  gap: 3rem;
}

.eyebrow {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  color: var(--text-main);
}

.hero-name {
  font-family: "Georgia", "Times New Roman", serif;
  letter-spacing: 0.12em;
  font-size: clamp(2.4rem, 4vw, 3rem);
  text-transform: uppercase;
  margin: 0;
}

.hero-role {
  margin: 0.4rem 0 2rem;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.hero-about h2 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}

.hero-about p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Photo side */

.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* IMAGE CONTAINER TAKES FULL HALF */
.photo-wrapper {
  width: 100%;
  max-width: none;        /* ❗ remove limitation */
  height: 100%;
  max-height: 80vh;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.4);
}

/* IMAGE FILLS CONTAINER */
.photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* ✅ no stretch */
}

/* Bottom navbar */

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  box-shadow: var(--shadow-soft);
  z-index: 30;
}

.nav-link {
  border: none;
  background: transparent;
  padding: 0.5rem 0.9rem 0.3rem;
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  text-decoration: none;   /* remove underline */
  color: inherit;
}

.nav-link span:first-child {
  white-space: nowrap;
}

.nav-underline {
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-link.active {
  color: var(--text-main);
  font-weight: 500;
}

.nav-link.active .nav-underline {
  width: 70%;
}

.nav-link:hover {
  color: var(--text-main);
}

/* Hover underline */
.nav-link:hover .nav-underline {
  width: 70%;
}
/* ===== COPYRIGHT TEXT BELOW NAVBAR ===== */

.copyright {
  position: fixed;
  bottom: 0.5rem;              /* below navbar */
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-align: center;
  z-index: 20;
  pointer-events: none;        /* click-through */
}

/* Adjust spacing on small screens */
@media (max-width: 640px) {
  .copyright {
    font-size: 0.7rem;
    bottom: 0.25rem;
  }
}
/* Responsiveness */

@media (max-width: 900px) {
  body {
    align-items: flex-start;
  }

  .page {
    padding-inline: 1.5rem;
    padding-top: 4.5rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .hero-right {
    justify-content: center;
    order: -1;
  }

  .photo-wrapper {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .page {
    padding-inline: 1.25rem;
    padding-bottom: 6.5rem;
  }

  .hero-name {
    font-size: 2.1rem;
    letter-spacing: 0.08em;
  }

  .hero-role {
    font-size: 1rem;
  }

  .bottom-nav {
    width: calc(100% - 2rem);
    justify-content: space-between;
    padding-inline: 1rem;
  }

  .nav-link {
    padding-inline: 0.4rem;
    font-size: 0.85rem;
  }

  .theme-toggle {
    right: 1.25rem;
    top: 1.1rem;
  }
}



/* ============ ABOUT PAGE LAYOUT ============ */

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.about-left {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.about-title {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(2.1rem, 3.3vw, 2.6rem);
  margin: 0;
}

.about-intro {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* small profile cards */

.about-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.about-profile-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.about-profile-card h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.about-profile-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.about-profile-card li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.about-profile-card li span:first-child {
  font-weight: 500;
}



/* ===== Contact links inside About page ===== */

.contact-links a {
  color: var(--text-main);
  font-size: 0.85rem;
  text-decoration: none;
  position: relative;
}

/* underline animation */
.contact-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.contact-links a:hover::after {
  width: 100%;
}

/* hover color */
.contact-links a:hover {
  color: var(--accent);
}

/* spacing fix */
.contact-links li {
  align-items: center;
}

/* dark mode clarity */
html[data-theme="dark"] .contact-links a {
  color: #e5e7eb;
}

/* Experience */

.about-section {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.about-section h2 {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.2rem;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.experience-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.15rem;
}

.experience-header h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-main);
}

.experience-company {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.experience-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

/* Right side: photo + education */

.about-right {
  display: flex;
  justify-content: flex-end;
}

.about-photo-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.about-photo {
  width: 100%;
  aspect-ratio: 1 / 1;      /* ✅ makes it square */
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
}

.education-card {
  background: var(--card-bg);
  border-radius: 22px;
  padding: 1.3rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.38);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.education-card h2 {
  margin: 0 0 0.8rem;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.1rem;
  color: var(--text-main);
}

.edu-item + .edu-item {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.55);
}

.edu-item h3 {
  margin: 0 0 0.15rem;
  font-size: 0.96rem;
  color: var(--text-main);
}

.edu-meta {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
}

/* Responsive for About page */

@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-right {
    justify-content: center;
  }

  .about-photo-card {
    max-width: 360px;
  }
}

@media (max-width: 640px) {
  .about-profile-grid {
    grid-template-columns: 1fr;
  }

  .page {
    padding-inline: 1.25rem;
  }
}


/* ===== PROJECTS PAGE ===== */

.projects-hero {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.projects-intro {
  max-width: 720px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.projects-grid {
  margin-top: 1.7rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  border-color: rgba(242, 139, 92, 0.8);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
}

.project-header h3 {
  margin: 0;
  font-size: 1rem;
}

.project-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(242, 139, 92, 0.12);
  color: var(--text-muted);
}

.project-description {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-tech {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--text-main);
}

.project-tech span {
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-right: 0.25rem;
}

.project-links {
  margin-top: 0.3rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.project-links a {
  color: var(--accent);
  text-decoration: none;
  position: relative;
}

.project-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.project-links a:hover::after {
  width: 100%;
}

.project-links a:hover {
  color: #e11d48;
}

/* Mobile refinement */
@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}



/* ===== CONTACT PAGE ===== */

.contact-hero {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.contact-intro {
  max-width: 720px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.contact-layout {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

/* Left: form card */

.contact-card {
  background: var(--card-bg);
  border-radius: 22px;
  padding: 1.6rem 1.7rem;
  border: 1px solid rgba(148,163,184,0.35);
  box-shadow: 0 16px 40px rgba(15,23,42,0.16);
}

.contact-card h2 {
  margin: 0 0 0.8rem;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.15rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.4rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-field label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-field input,
.contact-field textarea {
  font-family: inherit;
  font-size: 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  padding: 0.65rem 0.9rem;
  outline: none;
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

html[data-theme="dark"] .contact-field input,
html[data-theme="dark"] .contact-field textarea {
  background: #020617;
}

.contact-field textarea {
  border-radius: 16px;
  resize: vertical;
  min-height: 120px;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(242,139,92,0.3);
}

.contact-button {
  margin-top: 0.4rem;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--accent);
  color: #111827;
  box-shadow: 0 14px 35px rgba(242,139,92,0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(242,139,92,0.7);
}

.contact-quick {
  margin-top: 1.2rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.contact-quick p {
  margin: 0 0 0.4rem;
}

/* Right: map card */

.map-card {
  background: var(--card-bg);
  border-radius: 22px;
  padding: 1.5rem 1.6rem;
  border: 1px solid rgba(148,163,184,0.35);
  box-shadow: 0 16px 40px rgba(15,23,42,0.16);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.map-card h2 {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.15rem;
}

.map-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.map-frame-wrapper {
  margin-top: 0.6rem;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 18px 45px rgba(15,23,42,0.18);
}

.map-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Responsive */

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .contact-card,
  .map-card {
    padding: 1.3rem 1.3rem;
  }
}

/* ========== CONTACT POPUP ========== */

.contact-popup {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;              /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 60;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.contact-popup.show {
  display: flex;
}

.contact-popup-inner {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.35);
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.contact-popup-inner h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--text-main);
}

.contact-popup-inner p {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.popup-button {
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.popup-button:hover {
  opacity: 0.9;
}