/* ==========================================================================
   Modern Portfolio Stylesheet - Kondo Shota
   ========================================================================== */

/* --- Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Root Variables & Theme Definition --- */
:root {
  /* Common variables */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --container-width: 1200px;
  --header-height: 80px;

  /* Dark Theme Colors (Default) */
  --bg-color: #0b0f19;
  --bg-gradient: radial-gradient(circle at top, #111827 0%, #0b0f19 100%);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --card-bg: rgba(17, 24, 39, 0.65);
  --card-border: rgba(255, 255, 255, 0.07);
  --card-hover-border: rgba(99, 102, 241, 0.4);
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  
  --nav-bg: rgba(11, 15, 25, 0.8);
  --nav-border: rgba(255, 255, 255, 0.05);

  --accent-primary: #6366f1;
  --accent-primary-rgb: 99, 102, 241;
  --accent-secondary: #06b6d4;
  --accent-secondary-rgb: 6, 182, 212;
  --gradient-accent: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
  
  --blob-indigo: rgba(99, 102, 241, 0.15);
  --blob-cyan: rgba(6, 182, 212, 0.12);
  --blob-purple: rgba(168, 85, 247, 0.12);

  --input-bg: rgba(17, 24, 39, 0.8);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus-border: #6366f1;
}

/* Light Theme Colors Override */
body.light-theme {
  --bg-color: #f8fafc;
  --bg-gradient: radial-gradient(circle at top, #ffffff 0%, #f8fafc 100%);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(0, 0, 0, 0.06);
  --card-hover-border: rgba(79, 70, 229, 0.35);
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
  
  --nav-bg: rgba(248, 250, 252, 0.8);
  --nav-border: rgba(0, 0, 0, 0.05);

  --accent-primary: #4f46e5;
  --accent-primary-rgb: 79, 70, 229;
  --accent-secondary: #0891b2;
  --accent-secondary-rgb: 8, 145, 178;
  --gradient-accent: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #0891b2 100%);
  
  --blob-indigo: rgba(79, 70, 229, 0.07);
  --blob-cyan: rgba(8, 145, 178, 0.06);
  --blob-purple: rgba(147, 51, 234, 0.06);

  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: rgba(0, 0, 0, 0.08);
  --input-focus-border: #4f46e5;
}

/* --- Base Reset & Typography --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background var(--transition-normal), color var(--transition-normal);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

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

input, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

/* --- Base Layout --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
  position: relative;
  z-index: 2;
}

/* --- Dynamic Background Blobs --- */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.8;
  mix-blend-mode: multiply;
  animation: float 20s infinite alternate;
}

body.light-theme .blob {
  mix-blend-mode: normal;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--blob-indigo);
  top: -10%;
  right: -5%;
  animation-duration: 25s;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: var(--blob-cyan);
  bottom: -15%;
  left: -10%;
  animation-duration: 30s;
}

.blob-3 {
  width: 450px;
  height: 450px;
  background: var(--blob-purple);
  top: 40%;
  right: 25%;
  animation-duration: 22s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* --- Header & Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  transition: background var(--transition-normal), border-color var(--transition-normal), transform var(--transition-normal);
}

header.scroll-down {
  transform: translateY(-100%);
}

header.scroll-up {
  transform: translateY(0);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Theme Switcher Button */
.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-normal);
}

.theme-toggle-btn:hover {
  transform: scale(1.05);
  border-color: var(--card-hover-border);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--text-primary);
  transition: transform 0.5s ease;
}

body.light-theme .theme-toggle-btn .sun-icon {
  display: none;
}
body:not(.light-theme) .theme-toggle-btn .moon-icon {
  display: none;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  width: 24px;
  z-index: 101;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-normal);
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-tag {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.1);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  width: fit-content;
  border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
}

.hero-title span.accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  height: 2.7rem; /* Prevent layout shifting */
}

/* Typing Cursor Effect */
.typed-text {
  color: var(--accent-secondary);
  font-weight: 600;
}

.cursor {
  display: inline-block;
  width: 3px;
  background-color: var(--accent-secondary);
  margin-left: 4px;
  animation: blink 0.8s infinite;
}

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

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 580px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.btn-primary {
  background: var(--gradient-accent);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--card-hover-border);
  background: rgba(var(--accent-primary-rgb), 0.05);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Premium Visual Blob Frame */
.blob-frame {
  width: 350px;
  height: 350px;
  background: var(--gradient-accent);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: organic-morph 8s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.25);
}

/* Internal glass layer */
.blob-frame::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: rgba(11, 15, 25, 0.4);
  backdrop-filter: blur(10px);
  border-radius: inherit;
  z-index: 1;
}

body.light-theme .blob-frame::after {
  background: rgba(255, 255, 255, 0.3);
}

.avatar-mockup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: float-avatar 6s ease-in-out infinite;
}

@keyframes organic-morph {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 75%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

@keyframes float-avatar {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-15px); }
}

/* --- Section Formatting Common --- */
.section-title-wrap {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-primary);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* --- Glassmorphic Card Styling --- */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2.5rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-hover-border);
  box-shadow: 0 20px 40px -15px rgba(var(--accent-primary-rgb), 0.15);
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}

.about-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.about-heading {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.about-text {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--border-radius-md);
  background: rgba(var(--accent-primary-rgb), 0.03);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.05);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  background: rgba(var(--accent-primary-rgb), 0.1);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  color: var(--accent-primary);
}

.feature-icon-wrap svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Skills Section --- */
.skills-filter-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.5rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--card-hover-border);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--gradient-accent);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.skill-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: scale-up 0.4s ease-out forwards;
}

@keyframes scale-up {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(var(--accent-secondary-rgb), 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent-secondary);
}

.skill-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.skill-level {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-secondary);
  background: rgba(var(--accent-secondary-rgb), 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
}

.skill-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
}

.skill-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

body.light-theme .skill-progress-bar {
  background: rgba(0, 0, 0, 0.06);
}

.skill-progress-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 100px;
  width: 0%;
  transition: width 1.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* --- Projects Section --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
}

.project-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--card-border);
}

.project-img-wrapper svg {
  width: 100%;
  height: 100%;
  transition: transform var(--transition-normal);
}

.project-card:hover .project-img-wrapper svg {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 3;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  color: #0b0f19;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transform: translateY(15px);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.project-overlay-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.project-card:hover .project-overlay-btn {
  transform: translateY(0);
}

.project-overlay-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

.project-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-top: auto;
  align-self: flex-start;
}

.project-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.project-link:hover {
  color: var(--accent-primary);
}

.project-link:hover svg {
  transform: translateX(4px);
}

/* --- Timeline / Experience Section --- */
.timeline-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* Glowing point on timeline */
.timeline-dot {
  position: absolute;
  left: -2.35rem; /* center on the 2px left line */
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-color);
  box-shadow: 0 0 10px var(--accent-primary);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.4);
  background: var(--accent-secondary);
  box-shadow: 0 0 15px var(--accent-secondary);
}

.timeline-content {
  padding: 2rem;
}

.timeline-date {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.timeline-org {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: block;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  align-items: stretch;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-method {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(var(--accent-primary-rgb), 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.contact-lbl {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.contact-val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-val:hover {
  color: var(--accent-primary);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

body.light-theme .social-btn {
  background: rgba(0, 0, 0, 0.03);
}

.social-btn:hover {
  transform: translateY(-3px);
  color: #ffffff;
  background: var(--gradient-accent);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Contact Form CSS with Float Label Micro-interaction */
.contact-form-card {
  padding: 3rem;
}

.form-group {
  position: relative;
  margin-bottom: 2rem;
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  border-color: var(--input-focus-border);
  background: rgba(var(--accent-primary-rgb), 0.02);
  box-shadow: 0 0 0 4px rgba(var(--accent-primary-rgb), 0.1);
}

textarea.form-input {
  min-height: 150px;
  resize: vertical;
}

.form-label {
  position: absolute;
  left: 1.25rem;
  top: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: transform var(--transition-fast), font-size var(--transition-fast), color var(--transition-fast);
}

/* Float logic */
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  transform: translate(-0.4rem, -1.8rem) scale(0.85);
  color: var(--accent-primary);
}

/* Form success message overlay styling */
.form-success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
  min-height: 300px;
  animation: scale-up 0.4s ease-out forwards;
}

.success-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.success-icon-wrap svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

/* --- Footer --- */
footer {
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

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

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all var(--transition-fast);
  z-index: 99;
}

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

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* --- Mobile Responsiveness Media Queries --- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-desc {
    margin: 0 auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  section {
    padding: 4.5rem 0;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
    height: 2.25rem;
  }

  /* Nav menu toggle styles */
  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background: var(--bg-color);
    border-left: 1px solid var(--nav-border);
    flex-direction: column;
    padding: 3rem 2rem;
    align-items: flex-start;
    gap: 2rem;
    transition: right var(--transition-normal);
    z-index: 100;
  }

  .nav-menu.active {
    right: 0;
  }

  .theme-toggle-btn {
    margin-right: 1.5rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-form-card {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.3rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
    height: 3.8rem; /* multi line buffer */
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .btn {
    width: 100%;
  }

  .blob-frame {
    width: 280px;
    height: 280px;
  }
}
