/* Apple-inspired portfolio — system typography, generous space, subtle motion */

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

:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(251, 251, 253, 0.72);
  --nav-bg-opaque: rgba(251, 251, 253, 0.92);
  --nav-border: rgba(0, 0, 0, 0.08);
  --nav-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  --hero-gradient: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 45%, #e8e8ed 100%);
  --hero-overlay: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(0, 113, 227, 0.06), transparent 50%);
  --social-btn-bg: rgba(0, 0, 0, 0.04);
  --social-btn-bg-hover: rgba(0, 0, 0, 0.08);
  --scrolldown-hover-bg: rgba(0, 0, 0, 0.05);
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  --pill-bg: rgba(0, 0, 0, 0.05);
  --portfolio-canvas: #f5f5f7;
  --portfolio-hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  --modal-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  --footer-bg: #f5f5f7;
  --profile-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  --quotes-bg: linear-gradient(180deg, #ebebed 0%, #e3e3e8 100%);
  --quotes-eyebrow-c: #6e6e73;
  --quotes-title-c: #1d1d1f;
  --quote-card-bg: rgba(255, 255, 255, 0.72);
  --quote-card-border: rgba(0, 0, 0, 0.1);
  --quote-card-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  --quote-text-c: #1d1d1f;
  --quote-by-c: #6e6e73;
  --theme-toggle-bg: rgba(0, 0, 0, 0.06);
  --theme-toggle-bg-hover: rgba(0, 0, 0, 0.1);
  --go-top-shadow: rgba(0, 0, 0, 0.12);
  --go-top-shadow-hover: rgba(0, 0, 0, 0.15);
  --radius-large: 28px;
  --radius: 18px;
  --nav-h: 52px;
  --max: 980px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-elevated: #1c1c1e;
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --border: rgba(255, 255, 255, 0.12);
  --nav-bg: rgba(22, 22, 23, 0.72);
  --nav-bg-opaque: rgba(22, 22, 23, 0.92);
  --nav-border: rgba(255, 255, 255, 0.08);
  --nav-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  --hero-gradient: linear-gradient(180deg, #0d0d0f 0%, #000000 55%, #000000 100%);
  --hero-overlay: radial-gradient(ellipse 80% 50% at 50% -25%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 55%, rgba(10, 132, 255, 0.12), transparent 50%);
  --social-btn-bg: rgba(255, 255, 255, 0.08);
  --social-btn-bg-hover: rgba(255, 255, 255, 0.14);
  --scrolldown-hover-bg: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
  --pill-bg: rgba(255, 255, 255, 0.1);
  --portfolio-canvas: #2c2c2e;
  --portfolio-hover-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  --modal-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  --footer-bg: #000000;
  --profile-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  --quotes-bg: linear-gradient(180deg, #1d1d1f 0%, #0d0d0d 55%, #000000 100%);
  --quotes-eyebrow-c: #86868b;
  --quotes-title-c: #f5f5f7;
  --quote-card-bg: rgba(255, 255, 255, 0.04);
  --quote-card-border: rgba(255, 255, 255, 0.12);
  --quote-card-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  --quote-text-c: #f5f5f7;
  --quote-by-c: #86868b;
  --theme-toggle-bg: rgba(255, 255, 255, 0.1);
  --theme-toggle-bg-hover: rgba(255, 255, 255, 0.16);
  --go-top-shadow: rgba(0, 0, 0, 0.45);
  --go-top-shadow-hover: rgba(0, 0, 0, 0.55);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* —— Nav —— */
#nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#nav-wrap.opaque {
  background: var(--nav-bg-opaque);
  border-bottom-color: var(--nav-border);
  box-shadow: var(--nav-shadow);
}

.nav-bar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--max);
  width: 100%;
  padding: 0 56px 0 22px;
  box-sizing: border-box;
}

#nav {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 32px;
  flex-wrap: wrap;
}

#nav a {
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  opacity: 0.88;
  text-decoration: none;
  padding: 8px 0;
  transition: opacity 0.2s;
}

#nav a:hover {
  opacity: 1;
  text-decoration: none;
}

#nav li.current a {
  opacity: 1;
  font-weight: 600;
}

.theme-toggle {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--theme-toggle-bg);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.theme-toggle:hover {
  background: var(--theme-toggle-bg-hover);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle-icon {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

html[data-theme="light"] .theme-toggle-icon[data-show-when="light"],
html[data-theme="dark"] .theme-toggle-icon[data-show-when="dark"] {
  display: flex;
}

.mobile-btn {
  display: none;
}

@media (max-width: 520px) {
  .nav-bar-inner {
    flex-direction: column;
    padding: 0 16px 8px;
    gap: 10px;
  }

  .theme-toggle {
    position: static;
    transform: none;
  }
}

/* —— Hero —— */
header#home {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 48px) 24px 80px;
  background: var(--hero-gradient);
  overflow: hidden;
}

header#home::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  pointer-events: none;
}

header .banner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

header .banner-text h1.responsive-headline {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 16px;
  color: var(--text);
}

header .banner-text .hero-tagline {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.4211;
  letter-spacing: -0.015em;
  color: var(--text-secondary);
  margin: 0 auto 32px;
  max-width: 36em;
}

header .banner-text .hero-tagline span {
  color: var(--text);
  font-weight: 500;
}

header .banner-text hr {
  display: none;
}

header .social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

header .social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--social-btn-bg);
  color: var(--text);
  font-size: 18px;
  transition: background 0.2s, transform 0.2s var(--ease);
  text-decoration: none;
}

header .social a:hover {
  background: var(--social-btn-bg-hover);
  transform: scale(1.05);
  text-decoration: none;
}

.scrolldown {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  z-index: 2;
}

.scrolldown a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 20px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.scrolldown a:hover {
  color: var(--text);
  background: var(--scrolldown-hover-bg);
}

/* —— Sections —— */
section {
  padding: 88px 24px;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 40px;
  color: var(--text);
}

/* About */
#about {
  background: var(--bg-elevated);
}

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px 56px;
  align-items: start;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

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

.profile-pic {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-large);
  box-shadow: var(--profile-shadow);
}

.about-copy {
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 40px;
}

.about-copy strong,
.about-copy .lead-name {
  color: var(--text);
  font-weight: 600;
}

.contact-block {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.contact-block h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text);
}

.contact-block .address {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.contact-block .address a {
  color: var(--accent);
}

/* Resume */
#resume {
  background: var(--bg);
}

.resume-block {
  margin-bottom: 64px;
}

.resume-block:last-child {
  margin-bottom: 0;
}

.resume-block .section-title {
  margin-bottom: 32px;
}

.job-card,
.edu-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
}

.job-card h2,
.edu-card h3 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 12px;
}

.job-card h2 a,
.edu-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.job-card h2 a:hover,
.edu-card h3 a:hover {
  color: var(--accent);
}

.job-card .info,
.edu-card .info {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.job-card .info:last-of-type {
  margin-bottom: 0;
}

.job-card .info em,
.edu-card .info em {
  font-style: normal;
  color: var(--text);
  opacity: 0.85;
}

.job-card p:not(.info),
.edu-card p:not(.info) {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 16px 0 0;
}

.embed-row {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.embed-row iframe {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Skills */
.skill-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pills li {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 100px;
  background: var(--pill-bg);
  color: var(--text);
}

/* Portfolio */
#portfolio {
  background: var(--bg-elevated);
}

#portfolio .section-title {
  text-align: center;
  margin-bottom: 48px;
}

#portfolio-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.portfolio-item {
  margin: 0;
}

.portfolio-item .item-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--portfolio-canvas);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.portfolio-item .item-wrap:hover {
  transform: scale(1.02);
  box-shadow: var(--portfolio-hover-shadow);
}

.portfolio-item .item-wrap > a {
  display: block;
  position: relative;
  color: inherit;
  text-decoration: none;
}

.portfolio-item .item-wrap img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.portfolio-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.75));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.portfolio-item .item-wrap:hover .overlay {
  opacity: 1;
}

.portfolio-item-meta h5 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.portfolio-item-meta p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.portfolio-item .link-icon {
  display: none;
}

/* Modals (Magnific) */
.popup-modal {
  position: relative;
  background: var(--bg-elevated);
  padding: 0;
  max-width: 560px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--modal-shadow);
}

.popup-modal .description-box {
  padding: 28px 28px 0;
}

.popup-modal .description-box iframe {
  width: 100%;
  max-width: 100%;
  height: 280px;
  border-radius: 12px;
  border: none;
  margin-bottom: 20px;
}

.popup-modal .description-box h4 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--text);
}

.popup-modal .description-box p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 24px;
}

.popup-modal .link-box {
  display: flex;
  gap: 16px;
  padding: 0 28px 28px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 20px;
}

.popup-modal .link-box a:not(.popup-modal-dismiss) {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  padding: 10px 20px;
  border-radius: 100px;
  text-decoration: none;
}

.popup-modal .link-box a:not(.popup-modal-dismiss):hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.popup-modal .link-box .popup-modal-dismiss {
  color: var(--accent);
  background: transparent;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
}

/* Testimonials — static quote cards (no carousel) */
#testimonials {
  background: var(--quotes-bg);
  color: var(--quote-text-c);
  padding: 96px 24px 112px;
}

.quotes-inner {
  max-width: 1060px;
  margin: 0 auto;
  text-align: center;
}

.quotes-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--quotes-eyebrow-c);
  margin: 0 0 12px;
}

.quotes-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--quotes-title-c);
  margin: 0 0 48px;
}

.quotes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  text-align: left;
}

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

.quote-card {
  margin: 0;
  padding: 28px 28px 24px;
  border: 1px solid var(--quote-card-border);
  border-radius: var(--radius-large);
  background: var(--quote-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--quote-card-shadow);
}

.quote-card .quote-text {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--quote-text-c);
  margin: 0 0 20px;
}

.quote-card .quote-by {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.01em;
  color: var(--quote-by-c);
}

.quote-card .quote-by::before {
  content: "— ";
}

/* Footer */
footer {
  background: var(--footer-bg);
  padding: 48px 24px 32px;
  border-top: 1px solid var(--border);
}

footer .row {
  max-width: var(--max);
  margin: 0 auto;
}

footer .social-links {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

footer .social-links a {
  color: var(--text-secondary);
  font-size: 20px;
  transition: color 0.2s;
  text-decoration: none;
}

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

footer .copyright {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
}

#go-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
}

#go-top a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 4px 24px var(--go-top-shadow);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

#go-top a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--go-top-shadow-hover);
}

/* Utility: hide old grid column classes from breaking layout */
.row {
  max-width: 100%;
}

.header-col {
  margin-bottom: 0;
}

.two.columns,
.three.columns,
.nine.columns,
.ten.columns,
.twelve.columns,
.fifteen.columns {
  width: 100%;
  float: none;
}

.flex-container {
  width: 100%;
}
