/* ================================================
   STYLE.CSS — Yavuz Selim Aktaş Portfolio
   Design Language: insiderone.com inspired B2B SaaS
   ================================================ */

/* ------------------------------------------------
   0. CSS CUSTOM PROPERTIES (Design Tokens)
   ------------------------------------------------ */
:root {
  /* Colors — Light Mode (default) */
  --color-bg:         #f8f9fa;
  --color-bg-alt:     #ffffff;
  --color-surface:    #ffffff;
  --color-text:       #1a1a2e;
  --color-text-muted: #6b7280;
  --color-primary:    #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-border:     rgba(0, 0, 0, 0.06);
  --color-border-hover: rgba(0, 0, 0, 0.12);
  --color-glass:      rgba(255, 255, 255, 0.8);
  --color-overlay:    rgba(15, 15, 30, 0.6);
  --color-tag-bg:     #e0e7ff;
  --color-gradient-1: #e0e7ff;
  --color-gradient-2: #dbeafe;

  /* Typography */
  --font-family:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fs-hero:          clamp(2.5rem, 6vw, 4.5rem);
  --fs-h2:            clamp(1.75rem, 4vw, 2.75rem);
  --fs-h3:            clamp(1.15rem, 2vw, 1.5rem);
  --fs-body:          1rem;
  --fs-small:         0.875rem;
  --fw-regular:       400;
  --fw-medium:        500;
  --fw-semibold:      600;
  --fw-bold:          700;
  --fw-black:         900;

  /* Spacing */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;
  --space-3xl:  8rem;

  /* Misc */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-full: 50%;
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md:  0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg:  0 8px 40px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 12px 32px rgba(37, 99, 235, 0.15);
  --transition: all 0.3s ease;
  --container:  1140px;
}

/* ------------------------------------------------
   0b. DARK MODE OVERRIDES
   ------------------------------------------------ */
[data-theme="dark"] {
  --color-bg:         #0f1117;
  --color-bg-alt:     #161822;
  --color-surface:    #1e2030;
  --color-text:       #e4e6f0;
  --color-text-muted: #9ca3af;
  --color-primary:    #60a5fa;
  --color-primary-hover: #3b82f6;
  --color-border:     rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);
  --color-glass:      rgba(15, 17, 23, 0.85);
  --color-overlay:    rgba(0, 0, 0, 0.7);
  --color-tag-bg:     rgba(96, 165, 250, 0.15);
  --color-gradient-1: rgba(96, 165, 250, 0.12);
  --color-gradient-2: rgba(59, 130, 246, 0.08);
}

/* ------------------------------------------------
   1. RESET & BASE
   ------------------------------------------------ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ------------------------------------------------
   2. UTILITY CLASSES
   ------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
  text-align: center;
}

.section-subtitle {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}

/* ------------------------------------------------
   3. SCROLL REVEAL ANIMATION (fade-in-up)
   ------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ------------------------------------------------
   4. NAVBAR — Glassmorphism Sticky Header
   ------------------------------------------------ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--color-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.navbar__container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar__logo {
  font-size: 1.5rem;
  font-weight: var(--fw-black);
  letter-spacing: -0.03em;
  color: var(--color-text);
  transition: var(--transition);
}

.logo-dot {
  color: var(--color-primary);
}

.navbar__links {
  display: flex;
  gap: var(--space-lg);
}

.navbar__links a {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  transition: var(--transition);
  position: relative;
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.navbar__links a:hover {
  color: var(--color-text);
}

.navbar__links a:hover::after {
  width: 100%;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.lang-toggle:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.lang-toggle__option {
  color: var(--color-text-muted);
  transition: var(--transition);
  cursor: pointer;
}

.lang-toggle__option--active {
  color: var(--color-primary);
}

.lang-toggle__separator {
  color: var(--color-border-hover);
  user-select: none;
}

/* Theme Toggle (Dark/Light) */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--color-text-muted);
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 72px;
  left: 0;
  width: 100%;
  background: var(--color-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mobile-menu__links a {
  font-size: 1.1rem;
  font-weight: var(--fw-medium);
  color: var(--color-text);
  padding: var(--space-xs) 0;
  transition: var(--transition);
}

.mobile-menu__links a:hover {
  color: var(--color-primary);
}

/* ------------------------------------------------
   5. HERO SECTION
   ------------------------------------------------ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}

/* Subtle gradient orb decoration */
.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  top: -200px;
  right: -150px;
  border-radius: var(--radius-full);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  border-radius: var(--radius-full);
  pointer-events: none;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}

/* Avatar — Real Photo */
.hero__avatar {
  margin-bottom: var(--space-sm);
}

.avatar-photo {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.avatar-placeholder {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--color-primary);
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: var(--fw-black);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--color-text-muted);
  font-weight: var(--fw-regular);
  max-width: 520px;
}

.hero__buttons {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

/* Scroll indicator */
.hero__scroll-indicator {
  margin-top: var(--space-xl);
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%      { transform: rotate(45deg) translateY(8px); }
}

/* ------------------------------------------------
   6. BUTTONS
   ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border: 2px solid transparent;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ------------------------------------------------
   7. ABOUT SECTION — Education + Languages Cards
   ------------------------------------------------ */
.about {
  padding: var(--space-3xl) 0;
  background: var(--color-bg-alt);
}

.about-desc {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
  margin-bottom: var(--space-xl);
}

.about__grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-lg);
}

.about-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  transition: var(--transition);
}

.about-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.about-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  font-size: 1.4rem;
  color: var(--color-primary);
}

.about-card__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-md);
}

.about-card__text {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  line-height: 1.7;
  margin-bottom: 4px;
}

.about-card__meta {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: var(--fw-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}

/* Education entries */
.about-card__entries {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about-card__entry {
  padding-top: var(--space-sm);
}

.about-card__entry:first-child {
  padding-top: 0;
}

.about-card__entry + .about-card__entry {
  border-top: 1px solid var(--color-border);
}

/* Language list - vertical */
.about-card__lang-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.about-card__lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}

.about-card__lang-name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
}

.about-card__lang-level {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ------------------------------------------------
   8. SKILLS — Infinite Marquee
   ------------------------------------------------ */
.skills {
  padding: var(--space-3xl) 0;
  background: var(--color-bg);
  overflow: hidden;
}

.marquee {
  width: 100%;
  overflow: hidden;
  padding: var(--space-sm) 0;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.marquee--reverse .marquee__track {
  animation-direction: reverse;
}

.marquee__content {
  display: flex;
  gap: var(--space-md);
  padding: 0 var(--space-md);
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  white-space: nowrap;
  transition: var(--transition);
}

.marquee__item i {
  font-size: 1.1rem;
  color: var(--color-primary);
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ------------------------------------------------
   9. PROJECTS — Z-Pattern (Zigzag) Layout
   ------------------------------------------------ */
.projects {
  padding: var(--space-3xl) 0;
  background: var(--color-bg-alt);
}

.zigzag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-3xl);
}

.zigzag:last-child {
  margin-bottom: 0;
}

.zigzag__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

/* Reverse row: image first (via order on desktop) */
.zigzag--reverse .zigzag__image {
  order: -1;
}

.zigzag__tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: var(--color-tag-bg);
  border-radius: 100px;
  margin-bottom: var(--space-sm);
}

.zigzag__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.zigzag__desc {
  color: var(--color-text-muted);
  font-size: var(--fs-body);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

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

.zigzag__tech li {
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
}

/* Image Placeholder */
.image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2));
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--color-primary);
  font-size: 3rem;
  border: 1px solid var(--color-border);
}

.image-placeholder span {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}

/* ------------------------------------------------
   9b. GITHUB CTA
   ------------------------------------------------ */
.github-cta {
  margin-top: var(--space-xl);
}

.github-cta__inner {
  text-align: center;
  padding: var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.github-cta__inner:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
}

.github-cta__icon {
  font-size: 2.5rem;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.github-cta__text {
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
}

/* ------------------------------------------------
   9c. EXPERIENCE — Timeline
   ------------------------------------------------ */
.experience {
  padding: var(--space-3xl) 0;
  background: var(--color-bg);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline__item {
  position: relative;
  margin-bottom: var(--space-xl);
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -33px;
  top: 28px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-primary);
  z-index: 1;
}

.timeline__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: var(--transition);
}

.timeline__card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.timeline__role {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}

.timeline__company {
  font-size: var(--fs-small);
  color: var(--color-primary);
  font-weight: var(--fw-medium);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.timeline__date,
.timeline__location {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline__details {
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-md);
}

.timeline__details li {
  position: relative;
  padding-left: 20px;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  line-height: 1.8;
  margin-bottom: 4px;
}

.timeline__details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}

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

.timeline__tags span {
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
}

/* ------------------------------------------------
   10. CONTACT SECTION
   ------------------------------------------------ */
.contact {
  padding: var(--space-3xl) 0;
  background: var(--color-bg-alt);
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

a.contact-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.contact-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.contact-card__title {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.contact-card__value {
  font-size: var(--fs-small);
  color: var(--color-text);
  font-weight: var(--fw-medium);
  word-break: break-all;
}

/* ------------------------------------------------
   11. FOOTER
   ------------------------------------------------ */
.footer {
  padding: var(--space-lg) 0;
  background: var(--color-bg);
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.footer__text {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  max-width: 480px;
}

.footer__socials {
  display: flex;
  gap: var(--space-md);
}

.footer__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  transition: var(--transition);
}

.footer__icon:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.footer__copy {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

/* ------------------------------------------------
   11b. TYPING ANIMATION
   ------------------------------------------------ */
.typing {
  display: inline;
}

.typing__cursor {
  display: inline-block;
  color: var(--color-primary);
  font-weight: var(--fw-regular);
  animation: blink 0.8s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ------------------------------------------------
   11c. BACK TO TOP BUTTON
   ------------------------------------------------ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 999;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  padding: 0;
  line-height: 1;
  overflow: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
}

/* ------------------------------------------------
   11d. CONTACT FORM
   ------------------------------------------------ */
.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.contact-form-wrapper {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-lg), 5vw, var(--space-xl)) clamp(var(--space-md), 4vw, var(--space-xl));
  max-width: 680px;
  margin: 0 auto var(--space-xl);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.contact-form-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--color-primary), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.contact-form__group {
  position: relative;
}

/* Floating label */
.contact-form__label {
  position: absolute;
  left: 16px;
  top: 16px;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left center;
}

.contact-form__input {
  width: 100%;
  padding: 20px 16px 10px;
  font-size: var(--fs-body);
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  outline: none;
}

.contact-form__input:focus,
.contact-form__input:not(:placeholder-shown) {
  border-color: var(--color-primary);
}

.contact-form__input:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 0 20px rgba(37, 99, 235, 0.06);
  background: var(--color-surface);
}

/* Float label up when input is focused or has content */
.contact-form__input:focus ~ .contact-form__label,
.contact-form__input:not(:placeholder-shown) ~ .contact-form__label {
  top: 6px;
  font-size: 0.7rem;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Animated bottom accent line */
.contact-form__focus-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), #a78bfa);
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form__input:focus ~ .contact-form__focus-line {
  width: 100%;
  left: 0;
}

.contact-form__textarea {
  resize: vertical;
  min-height: 140px;
}

/* Modern gradient button */
.contact-form__submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  font-family: var(--font-family);
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form__submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7c3aed, var(--color-primary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-form__submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35), 0 0 40px rgba(124, 58, 237, 0.15);
}

.contact-form__submit:hover::before {
  opacity: 1;
}

.contact-form__submit span,
.contact-form__submit i {
  position: relative;
  z-index: 1;
}

.contact-form__submit i {
  font-size: 0.9em;
  transition: transform 0.3s ease;
}

.contact-form__submit:hover i {
  transform: translateX(4px) translateY(-2px);
}

.contact-form__submit:active {
  transform: translateY(-1px);
}

/* Submit button states */
.contact-form__submit.is-loading .contact-form__submit-text,
.contact-form__submit.is-loading .contact-form__submit-icon {
  opacity: 0;
  transform: scale(0.8);
}

.contact-form__submit.is-loading .contact-form__spinner {
  display: block;
}

.contact-form__submit.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.contact-form__submit-text,
.contact-form__submit-icon {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Spinner */
.contact-form__spinner {
  display: none;
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinRotate 0.7s linear infinite;
}

@keyframes spinRotate {
  to { transform: rotate(360deg); }
}

/* ── Toast Notification ── */
.form-toast {
  position: fixed;
  bottom: 40px;
  right: -420px;
  min-width: 340px;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  z-index: 10000;
  transition: right 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  overflow: hidden;
}

.form-toast.is-visible {
  right: 40px;
}

.form-toast__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  animation: toastIconPop 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.3s both;
}

@keyframes toastIconPop {
  0%   { transform: scale(0) rotate(-45deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Success variant */
.form-toast--success .form-toast__icon {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #fff;
}

.form-toast--success .form-toast__progress {
  background: linear-gradient(90deg, #10b981, #34d399);
}

/* Error variant */
.form-toast--error .form-toast__icon {
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: #fff;
}

.form-toast--error .form-toast__progress {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.form-toast__content {
  flex: 1;
  min-width: 0;
}

.form-toast__title {
  font-size: 0.95rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 2px;
}

.form-toast__message {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.4;
}

.form-toast__close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
}

.form-toast__close:hover {
  color: var(--color-text);
}

/* Progress bar */
.form-toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  animation: toastTimer 5s linear forwards;
}

@keyframes toastTimer {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* Success checkmark animation (inline SVG) */
.form-toast__icon svg {
  width: 24px;
  height: 24px;
}

.form-toast--success .form-toast__icon .check-path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawCheck 0.5s ease 0.5s forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.form-toast--error .form-toast__icon .x-path {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: drawX 0.4s ease 0.5s forwards;
}

@keyframes drawX {
  to { stroke-dashoffset: 0; }
}

/* Confetti burst for success */
@keyframes confettiBurst {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-60px) scale(0); opacity: 0; }
}

.form-confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confettiBurst 0.8s ease-out forwards;
  pointer-events: none;
}

/* Dark mode toast */
[data-theme="dark"] .form-toast {
  background: #1e293b;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.2);
}

[data-theme="dark"] .form-toast__title {
  color: #f1f5f9;
}

[data-theme="dark"] .form-toast__message {
  color: #94a3b8;
}

[data-theme="dark"] .form-toast__close {
  color: #64748b;
}

[data-theme="dark"] .form-toast__close:hover {
  color: #f1f5f9;
}

/* Mobile toast */
@media (max-width: 768px) {
  .form-toast {
    min-width: auto;
    max-width: calc(100vw - 32px);
    bottom: 20px;
    right: -100%;
    margin: 0 16px;
  }
  .form-toast.is-visible {
    right: 0;
  }
}

/* ------------------------------------------------
   12. RESPONSIVE — Mobile Breakpoint (768px)
   ------------------------------------------------ */
@media (max-width: 768px) {
  /* Navbar */
  .navbar__links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    padding: var(--space-2xl) var(--space-md);
    min-height: auto;
    padding-top: 120px;
  }

  .avatar-photo {
    width: 110px;
    height: 110px;
  }

  .avatar-placeholder {
    width: 110px;
    height: 110px;
    font-size: 2.2rem;
  }

  .hero__buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .hero__buttons .btn {
    width: 100%;
    justify-content: center;
  }

  /* About Grid */
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  /* Contact Grid */
  .contact__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .contact-form__row {
    grid-template-columns: 1fr;
  }

  /* Timeline */
  .timeline__header {
    flex-direction: column;
  }

  .timeline__meta {
    align-items: flex-start;
  }

  /* Zigzag: Stack vertically, image always on top */
  .zigzag {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .zigzag__image {
    order: -1;
  }

  .zigzag--reverse .zigzag__image {
    order: -1;
  }

  /* Footer */
  .footer__text {
    font-size: 1.15rem;
  }

  /* Back to top button — mobile fix */
  .back-to-top {
    width: 42px;
    height: 42px;
    bottom: 1.2rem;
    right: 1.2rem;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --space-3xl: 5rem;
    --space-2xl: 4rem;
  }

  .navbar__container {
    height: 60px;
  }

  .mobile-menu {
    top: 60px;
  }

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