/* ===== Portfolio – Global & Hero ===== */

:root {
  --bg-dark:    #0e1a24;
  --bg-mid:     #132030;
  --border:     #2a4a6b;
  --accent:     #a77693;
  --accent-dim: #a7769320;
  --text-bright:#f2f3f4;
  --text-mid:   #ded1c6;
  --text-muted: #7a9ab0;
}

body.light {
  --bg-dark:    #f2f3f4;
  --bg-mid:     #e4ddd6;
  --border:     #c8bdb5;
  --accent:     #a77693;
  --accent-dim: #a7769318;
  --text-bright:#1a1a2e;
  --text-mid:   #3a3a4a;
  --text-muted: #6a6a7a;
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  margin: 0;
  background-color: var(--bg-dark);
  color: var(--text-mid);
}

/* ── Navbar ── */
#navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 56px;
  background-color: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-name {
  color: var(--text-bright);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 28px;
  align-items: center;
}

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

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

.nav-icons {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 18px;
}

.nav-icons a {
  color: var(--text-mid);
  font-size: 1.1rem;
  transition: color 0.2s;
}

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

/* ── Hero Section ── */
#home {
  min-height: 100vh;
  background-color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  padding: 80px 60px 40px;
}

.hero-image {
  flex-shrink: 0;
  width: 280px;
  height: 340px;
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--bg-mid);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-text {
  max-width: 460px;
  color: var(--text-mid);
}

.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0 0 8px 0;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.hero-text h1 .highlight {
  display: inline;
  font-size: 3.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: 'Georgia', serif;
  background: linear-gradient(
    120deg,
    #a77693 0%,
    #ded1c6 35%,
    #f2f3f4 50%,
    #ded1c6 65%,
    #a77693 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: sparkle 3s linear infinite;
}

@keyframes sparkle {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Section heading sparkle */
.about-brace {
  display: inline;
  background: linear-gradient(
    120deg,
    #a77693 0%,
    #ded1c6 35%,
    #f2f3f4 50%,
    #ded1c6 65%,
    #a77693 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: sparkle 3s linear infinite;
  font-weight: 300;
}

.cursor {
  display: inline;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  font-size: 2.8rem;
  font-weight: 400;
  animation: blink 1s step-end infinite;
}

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

.hero-bio {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-mid);
  margin: 12px 0 32px 0;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 14px 28px;
  background: var(--accent);
  color: var(--bg-dark);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary:hover { background: #cce0f0; }

.btn-say-hi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-say-hi:hover { background: var(--accent-dim); }

@media (max-width: 700px) {
  #home {
    flex-direction: column;
    gap: 40px;
    padding: 100px 24px 40px;
    text-align: center;
  }
  .hero-image { width: 200px; height: 240px; }
  .hero-text h1 { font-size: 2rem; }
  .hero-text h1 .highlight { font-size: 2.4rem; }
  #navbar { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-name { font-size: 0.9rem; }
}

/* ===== Shared ===== */

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

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 60px;
}

.about-heading {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-bright);
  margin: 0 0 48px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.about-heading::after {
  content: '';
  display: block;
  height: 1px;
  width: 200px;
  background: var(--border);
}

/* ===== About Section ===== */

#about {
  background-color: var(--bg-mid);
  padding: 100px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 60px;
  align-items: start;
}

.about-tagline {
  font-size: 1.6rem !important;
  font-weight: 700;
  color: var(--text-bright) !important;
  line-height: 1.3;
  margin: 0 0 28px 0 !important;
  letter-spacing: -0.01em;
}

.about-tagline .teal {
  color: var(--accent);
  display: block;
}

.about-text p {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-mid);
  margin: 0 0 16px 0;
}

.about-text strong {
  color: var(--text-bright);
  font-weight: 600;
}

.skills-block { margin-top: 32px; }

.skills-label {
  font-size: 0.72rem !important;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  margin: 0 0 12px 0 !important;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills-tags span {
  font-size: 0.82rem;
  color: var(--text-mid);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  background: transparent;
  transition: border-color 0.2s, color 0.2s;
}

.skills-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.about-image {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-dark);
  border: 1px solid var(--border);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-image { height: 360px; position: static; }
  .about-heading::after { width: 80px; }
  .about-tagline { font-size: 1.3rem !important; }
}

/* ===== Experience Section ===== */

#experience {
  background-color: var(--bg-dark);
  padding: 100px 0;
}

.exp-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
}

.exp-tabs {
  list-style: none;
  margin: 0; padding: 0;
  border-left: 2px solid var(--border);
}

.exp-tab {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
  padding: 12px 20px;
  text-align: left;
  font-size: 0.82rem;
  color: var(--text-mid);
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.exp-tab:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.exp-tab.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}

.exp-panels { padding: 0 0 0 40px; }
.exp-panel { display: none; }
.exp-panel.active { display: block; }

.exp-panel h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0 0 8px 0;
}

.exp-at { font-weight: 400; color: var(--text-mid); }
.exp-co { color: var(--accent); }

.exp-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 24px 0;
  font-family: monospace;
}

.exp-panel ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exp-panel li {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
}

.exp-panel li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
  top: 3px;
}

@media (max-width: 600px) {
  .exp-layout { grid-template-columns: 1fr; }
  .exp-tabs {
    display: flex;
    border-left: none;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    margin-bottom: 32px;
  }
  .exp-tab {
    border-left: none;
    border-bottom: 2px solid transparent;
    margin-left: 0;
    margin-bottom: -2px;
  }
  .exp-tab.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }
  .exp-panels { padding: 0; }
  .section-inner { padding: 0 20px; }
}
/* ===== Projects Section ===== */

#projects {
  background-color: var(--bg-mid);
  padding: 100px 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.proj-card {
  text-decoration: none;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s;
}

.proj-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.proj-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-tags span {
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  background: var(--accent-dim);
}

.proj-links {
  display: flex;
  gap: 14px;
}

.proj-links a {
  color: var(--text-mid);
  font-size: 1rem;
  transition: color 0.2s;
}

.proj-links a:hover { color: var(--accent); }

.proj-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0;
}

.proj-card p {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.projects-more {
  text-align: center;
  margin-top: 16px;
}

.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 12px 28px;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-more:hover { background: var(--accent-dim); }

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

/* ===== API Demo Section ===== */

#api-demo {
  background-color: var(--bg-dark);
  padding: 100px 0;
}

.demo-desc {
  font-size: 0.92rem;
  color: var(--text-mid);
  margin: 0 0 28px 0;
}

.btn-load {
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background-color: var(--accent);
  color: var(--bg-dark);
  border: none;
  border-radius: 4px;
  margin-bottom: 28px;
  transition: background 0.2s;
}

.btn-load:hover { background-color: #cce0f0; }
.btn-load:disabled { background-color: var(--text-muted); cursor: not-allowed; }

#dataOutput .data-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  max-width: 420px;
  background-color: var(--bg-mid);
  margin-top: 4px;
}

#dataOutput .data-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0 0 16px 0;
}

#dataOutput .data-card p {
  margin: 10px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-mid);
}

#dataOutput .data-card p:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

#dataOutput .data-card span.label {
  color: var(--accent);
  font-weight: 600;
  margin-right: 8px;
}

.data-status { font-style: italic; color: var(--text-mid); }
.data-error  { color: #e07070; font-weight: 600; }

/* ===== Footer ===== */

#footer {
  background-color: var(--bg-mid);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 60px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.footer-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.footer-sub {
  font-size: 0.82rem;
  color: var(--text-mid);
  margin: 0 0 16px 0;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}

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

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding: 0 24px;
  }
  .footer-links { align-items: flex-start; }
}

/* ===== Weather App ===== */

#cityButtons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.city-btn {
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  background-color: var(--accent);
  color: var(--bg-dark);
  border: none;
  border-radius: 4px;
}

.city-btn:hover { background-color: #cce0f0; }

#output {
  background: var(--bg-mid);
  color: var(--text-mid);
  padding: 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  min-height: 40px;
  white-space: pre-wrap;
}

.proj-demo-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 4px;
  transition: opacity 0.2s;
}

.proj-demo-link:hover { opacity: 0.75; }

/* ===== Tech Stack Section ===== */

#tech-stack {
  background-color: var(--bg-dark);
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.stack-group h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px 0;
}

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

/* ===== Theme Toggle ===== */

#themeToggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}

#themeToggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Light mode: gradient text needs dark fallback */
body.light .hero-text h1 .highlight {
  background: linear-gradient(120deg, #a77693 0%, #6a3a5a 40%, #3a1a2e 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: sparkle 3s linear infinite;
}

body.light .about-brace {
  background: linear-gradient(120deg, #a77693 0%, #6a3a5a 40%, #3a1a2e 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: sparkle 3s linear infinite;
}

/* ===== Weather Modal ===== */

#weatherBtn, .nav-weather-btn {
  background: none;
  border: none;
  color: var(--text-mid);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 10px;
  transition: color 0.2s;
  font-family: inherit;
}

.nav-weather-btn:hover { color: var(--accent); }

.w-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.w-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.w-modal {
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 380px;
  margin: 16px;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.25s ease;
  position: relative;
  z-index: 10000;
}

.w-modal-overlay.open .w-modal {
  transform: translateY(0) scale(1);
}

.w-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.w-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.w-modal-title h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.w-modal-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-mid);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}

.w-modal-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.w-modal-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 20px;
}

.w-city-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.w-city-btn {
  width: 100%;
  padding: 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-mid);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.w-city-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.w-city-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-dark);
}

.w-result {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.w-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.w-row:last-child { border-bottom: none; }

.w-label {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.w-val {
  color: var(--text-bright);
  font-weight: 500;
}

.nav-weather-btn {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 10px;
  display: inline-block;
  transition: color 0.2s;
}

.nav-weather-btn:hover {
  color: var(--accent);
}
