/* =========================================================
   Base Styles & Theme
   ========================================================= */

:root {
  /* Base palette for dark theme */
  --bg-color: #050810;
  --bg-elevated: #060a16;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: #1f2933;
  --error: #ef4444;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.75);
}

/* Enable smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, #020617, #020617 40%, #020617 100%);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}

/* Simple container for consistent horizontal padding */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Allow sections to scroll into view cleanly below sticky header */
.section {
  scroll-margin-top: 5rem;
}

/* =========================================================
   Header & Navigation
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 8, 16, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(31, 41, 51, 0.9);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Larger, responsive logo image on the left */
.logo-image {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Wrapper for theme toggle + nav toggle on the right */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Theme toggle button */
.theme-toggle {
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease;
}

.theme-toggle:hover,
.theme-toggle:focus {
  background-color: rgba(31, 41, 55, 0.95);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.8);
}

.theme-toggle-icon {
  line-height: 1;
}

/* Mobile nav toggle (hamburger) */
.nav-toggle {
  border: none;
  background: transparent;
  padding: 0.35rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
}

.nav-toggle-line {
  width: 20px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Animate lines into an X when nav is open */
.nav-toggle.nav-open .nav-toggle-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle.nav-open .nav-toggle-line:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Navigation links */
.main-nav {
  position: fixed;
  inset: 3.2rem 0 auto 0;
  background-color: rgba(5, 8, 16, 0.98);
  border-bottom: 1px solid rgba(31, 41, 51, 0.8);
  transform: translateY(-110%);
  transition: transform 0.3s ease, background 0.25s ease, border-color 0.25s ease;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.15s ease;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--accent);
  transform: translateY(-1px);
}

/* Show nav when toggled */
.main-nav.nav-open {
  transform: translateY(0%);
}

/* =========================================================
   Sections (global)
   ========================================================= */

.section {
  padding: 3.5rem 0 3.25rem;
}

.section-inner {
  box-shadow: var(--shadow-soft);
  border-radius: 1.6rem;
  background: radial-gradient(circle at top left, #111827, #020617);
  border: 1px solid rgba(31, 41, 51, 0.95);
  padding: 2.25rem 1.6rem 2rem;
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Thin accent line at top for a high-end feel */
.section-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border-top: 1px solid rgba(59, 130, 246, 0.35);
  opacity: 0.8;
  pointer-events: none;
}

.section-header {
  text-align: left;
  margin-bottom: 1.75rem;
}

.section-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
}

.section-header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* =========================================================
   Hero Section
   ========================================================= */

.hero-section {
  padding-top: 4.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.hero-title {
  margin: 0 0 0.4rem;
  font-size: 1.9rem;
}

.hero-subtitle {
  margin: 0 0 1.2rem;
  font-size: 0.98rem;
  max-width: 34rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Small highlight pills to captivate quickly */
.hero-highlights {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.highlight-pill {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
}

/* Hero aside with larger profile card on the left */
.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* High-end, much larger profile card */
.profile-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.3rem 1.4rem;
  border-radius: 1.5rem;
  background: radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.22),
      rgba(15, 23, 42, 0.98)
    );
  border: 1px solid rgba(55, 65, 81, 0.95);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.9);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Larger round profile frame (scaled up) */
.profile-photo-frame {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  padding: 3px;
  background: conic-gradient(from 180deg, #3b82f6, #22c55e, #eab308, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo-frame img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

/* Name + role text */
.profile-meta {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
}

.profile-role {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Skill tags under card */
.hero-tag {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(156, 163, 175, 0.35);
  background-color: rgba(17, 24, 39, 0.9);
}

.hero-tag-dev {
  border-color: rgba(59, 130, 246, 0.9);
  background-color: rgba(37, 99, 235, 0.1);
}

.hero-tag-stats {
  border-color: rgba(16, 185, 129, 0.9);
  background-color: rgba(5, 150, 105, 0.1);
}

.hero-tag-trader {
  border-color: rgba(234, 179, 8, 0.9);
  background-color: rgba(234, 179, 8, 0.1);
}

/* =========================================================
   About Section
   ========================================================= */

.about-content p {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* =========================================================
   Skills Section
   ========================================================= */

.skills-grid {
  display: grid;
  gap: 1rem;
}

.skill-card {
  padding: 1.2rem 1.05rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.skill-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.skill-level {
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.skill-list {
  list-style: disc;
  padding-left: 1.1rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========================================================
   Experience Section
   ========================================================= */

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  padding: 1.2rem 1.05rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #020617, #030712);
  border: 1px solid rgba(31, 41, 55, 0.95);
}

.timeline-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.timeline-tag {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.timeline-item p {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========================================================
   Contact Section
   ========================================================= */

.contact-grid {
  display: grid;
  gap: 2rem;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.form-group {
  display: grid;
  gap: 0.3rem;
}

label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

input,
textarea {
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: #020617;
  color: var(--text-main);
  font: inherit;
  resize: vertical;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #4b5563;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(61, 130, 246, 0.5);
}

.contact-info h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}

.contact-info p {
  margin: 0 0 0.8rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.social-list li {
  margin-bottom: 0.45rem;
}

.social-label {
  display: inline-block;
  width: 7rem;
  color: var(--text-muted);
}

/* Base link reset so URLs do not show underlines */
.social-list a {
  text-decoration: none;
  color: var(--accent);
}

/* Short "Account" pill buttons */
.account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background-color: transparent;
  color: var(--accent);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease;
}

.account-link:hover,
.account-link:focus {
  background-color: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #e5f0ff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.4);
}

.primary-btn:hover,
.primary-btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 17px 36px rgba(37, 99, 235, 0.55);
}

.ghost-btn {
  background-color: transparent;
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text-main);
}

.ghost-btn:hover,
.ghost-btn:focus {
  background-color: rgba(15, 23, 42, 0.85);
  transform: translateY(-1px);
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  padding: 1.8rem 0 1.6rem;
}

.footer-inner {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================================================
   Responsive Breakpoints
   ========================================================= */

/* Medium devices / tablets */
@media (min-width: 640px) {
  .section-inner {
    padding: 2.5rem 2.25rem 2.25rem;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .profile-photo-frame {
    width: 180px;
    height: 180px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Large devices / desktops */
@media (min-width: 900px) {
  .header-inner {
    padding-inline: 0.5rem;
  }

  .logo-image {
    height: 60px;
  }

  /* Desktop nav: show inline, hide mobile toggle */
  .nav-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    transform: none;
    border-bottom: none;
    background: transparent;
  }

  .main-nav ul {
    flex-direction: row;
    padding: 0;
    gap: 1.25rem;
  }

  .main-nav a {
    font-size: 0.9rem;
    padding: 0.25rem 0;
  }

  .section {
    padding: 4.25rem 0;
  }

  .hero-section {
    padding-top: 5.25rem;
  }

  .hero-inner {
    gap: 3rem;
  }

  .profile-photo-frame {
    width: 200px;
    height: 200px;
  }

  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: flex-start;
  }
}

/* =========================================================
   Light Theme Overrides
   ========================================================= */

body.theme-light {
  --bg-color: #f3f4f6;
  --bg-elevated: #ffffff;
  --text-main: #020617;
  --text-muted: #4b5563;
  --border-subtle: #e5e7eb;
  color-scheme: light;
  background: radial-gradient(circle at top, #e5e7eb, #f9fafb 40%, #f9fafb 100%);
}

body.theme-light .site-header {
  background: rgba(249, 250, 251, 0.92);
  border-bottom-color: rgba(209, 213, 219, 0.9);
}

body.theme-light .main-nav {
  background-color: rgba(249, 250, 251, 0.98);
  border-bottom-color: rgba(209, 213, 219, 0.9);
}

body.theme-light .section-inner {
  background: radial-gradient(circle at top left, #ffffff, #e5e7eb);
  border-color: #e5e7eb;
  box-shadow: 0 18px 40px rgba(148, 163, 184, 0.35);
}

body.theme-light .profile-card {
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), #ffffff);
  border-color: #e5e7eb;
  box-shadow: 0 20px 50px rgba(148, 163, 184, 0.35);
}

body.theme-light .hero-tag {
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

body.theme-light .highlight-pill {
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

body.theme-light input,
body.theme-light textarea {
  background-color: #ffffff;
  color: var(--text-main);
  border-color: #e5e7eb;
}

body.theme-light .theme-toggle {
  background-color: #ffffff;
  border-color: #e5e7eb;
}

/* Make experience cards light in light mode */
body.theme-light .timeline-item {
  background: linear-gradient(135deg, #ffffff, #e5e7eb);
  border-color: #e5e7eb;
}
