/* ==========================================================================
   Portfolio — Thomas Petermann
   ========================================================================== */

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

:root {
  --bg: #09090b;
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --text: #fafafa;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.35);

  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.15);

  --green: #22c55e;
  --purple: #a855f7;
  --amber: #eab308;
  --red: #ef4444;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 1100px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

#three-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.hero,
.section,
.footer {
  position: relative;
}

.hero .container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  min-height: inherit;
  width: 100%;
}

.hero-grid {
  display: flex;
  align-items: center;
  gap: 60px;
  width: 100%;
}

.hero-visual {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

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

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

button {
  font-family: inherit;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* Animations
   -------------------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Lucide icon sizing
   -------------------------------------------------------------------------- */
.lucide {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.lucide-lg { width: 20px; height: 20px; }
.lucide-xl { width: 24px; height: 24px; }

/* Navbar
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 40px;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.3s;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: all 0.3s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.25s ease;
}

.nav-toggle:hover { border-color: var(--border-hover); }

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

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

/* Hero
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.hero-text {
  flex: 1;
  text-align: left;
  max-width: 550px;
  margin: 0;
  animation: fadeUp 0.8s ease 0.2s both;
}

.hero-title {
  font-size: 68px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -2.5px;
  margin: 0 0 24px;
  color: var(--text);
  text-align: left;
  max-width: 550px;
}

.hero-title span {
  color: var(--text-secondary);
  font-weight: 300;
}

.hero-intro {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 550px;
  margin: 0 0 40px;
  text-align: left;
}

.hero-btns {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  margin: 0;
}

.hero-btns .btn {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 10px 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
}

.btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-card);
}

.btn-ghost,
.btn-outline { /* same as base .btn */ }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

/* Section primitives
   -------------------------------------------------------------------------- */
.section { padding: 80px 0; }

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.section-tag {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Skills
   -------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity 0.3s;
}

.skill-card:nth-child(1)::before { background: var(--accent); }
.skill-card:nth-child(2)::before { background: var(--green); }
.skill-card:nth-child(3)::before { background: var(--purple); }

.skill-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.skill-card:hover::before { opacity: 1; }

.skill-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.skill-icon.dev   { background: rgba(59, 130, 246, 0.1); color: var(--accent); }
.skill-icon.cloud { background: rgba(34, 197, 94, 0.1);  color: var(--green); }
.skill-icon.ai    { background: rgba(168, 85, 247, 0.1); color: var(--purple); }

.skill-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.skill-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

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

.tech-tag {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}

.tech-tag:hover { background: rgba(255, 255, 255, 0.1); }

/* Skills (icons grid)
   -------------------------------------------------------------------------- */
.skills-intro {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 720px;
  margin-bottom: 36px;
}

.skills-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.skills-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.skills-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity 0.3s;
}

.skills-group:nth-child(1)::before { background: var(--accent); }
.skills-group:nth-child(2)::before { background: var(--green); }
.skills-group:nth-child(3)::before { background: var(--purple); }
.skills-group:nth-child(4)::before { background: var(--amber); }
.skills-group:nth-child(5)::before { background: var(--red); }
.skills-group:nth-child(6)::before { background: #06b6d4; }

.skills-group:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.skills-group:hover::before { opacity: 1; }

.skills-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 18px;
}

.skills-group-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 64px;
  opacity: 0.7;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.skill-item i[class^="devicon-"],
.skill-item i[class*=" devicon-"] {
  font-size: 28px;
  line-height: 1;
}

.skill-item .lucide-skill {
  width: 26px;
  height: 26px;
  stroke-width: 1.6;
  color: var(--text-secondary);
}

.skill-item span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.skill-item:hover {
  opacity: 1;
  transform: scale(1.1);
}

.skill-item:hover span { color: var(--text); }
.skill-item:hover .lucide-skill { color: var(--accent); }

/* Timeline
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 60px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--purple) 50%, var(--border) 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

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

.timeline-dot {
  position: absolute;
  left: -60px;
  top: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--accent);
}

.timeline-dot.active {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
  color: var(--green);
}


.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s;
}

.timeline-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.tc-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.tc-top-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tc-role {
  font-size: 20px;
  font-weight: 700;
}

.tc-date {
  font-size: 12px;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tc-date.green {
  color: var(--green);
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.tc-company-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.tc-company-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
}

.tc-company {
  font-size: 14px;
  color: var(--text-secondary);
}

.tc-location {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.tc-type-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.tc-type-badge.alternance {
  background: rgba(168, 85, 247, 0.1);
  color: var(--purple);
}

.tc-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.tc-achievements-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tc-bullets {
  list-style: none;
  margin-bottom: 20px;
}

.tc-bullets li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 22px;
  position: relative;
  margin-bottom: 6px;
}

.tc-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

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

.tc-tag {
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--accent);
  font-weight: 500;
  transition: all 0.2s;
}

.tc-tag:hover { background: rgba(59, 130, 246, 0.08); }

.tc-type-badge.formation {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

/* Projects
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.proj-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s;
  display: block;
}

.proj-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

a.proj-card { cursor: pointer; }

.proj-preview {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.proj-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(9, 9, 11, 0.5) 100%);
  pointer-events: none;
}

.proj-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.proj-preview.crypto { background: linear-gradient(135deg, #1a0a2e 0%, #2d1b69 40%, #1a0a2e 100%); }

.proj-preview.altiq::after {
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.3) 0%, rgba(9, 9, 11, 0.7) 100%);
}

.proj-preview-icon {
  width: 80px;
  height: 80px;
  color: rgba(255, 255, 255, 0.08);
  stroke-width: 1.5;
  z-index: 1;
}

.proj-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  z-index: 2;
}

.proj-badge.active { background: rgba(34, 197, 94, 0.15);  color: var(--green); }
.proj-badge.school { background: rgba(59, 130, 246, 0.15); color: var(--accent); }
.proj-badge.pro    { background: rgba(168, 85, 247, 0.15); color: var(--purple); }

.proj-body { padding: 24px; }

.proj-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.proj-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

.proj-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.proj-techs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.proj-tech {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-weight: 500;
}

.proj-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s;
  white-space: nowrap;
}

.proj-card:hover .proj-link { gap: 10px; }

.proj-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.proj-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.proj-action:hover { transform: translateY(-1px); }

.proj-action-secondary {
  background: var(--bg-card-hover);
  border-color: var(--border);
  color: var(--text);
}

.proj-action-secondary:hover { border-color: var(--border-hover); }

.proj-action-primary {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--accent);
}

.proj-action-primary:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.35);
}

/* Contact
   -------------------------------------------------------------------------- */
.contact-section {
  padding: 80px 0;
  position: relative;
}

.contact-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.contact-intro {
  margin-bottom: 48px;
  max-width: 720px;
}

.contact-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 0 0 12px;
  color: var(--text);
}

.contact-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.contact-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.contact-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.contact-card-body {
  flex: 1;
  min-width: 0;
}

.contact-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-card-value {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  word-break: break-word;
}

a.contact-card-value:hover { color: var(--accent); }

.contact-card-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.contact-follow {
  margin-top: 8px;
}

.contact-follow-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.contact-follow-links {
  display: flex;
  gap: 10px;
}

.contact-follow-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.contact-follow-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.contact-availability {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 8px;
}

.contact-availability-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.contact-availability-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  animation: pulse 2s infinite;
}

.contact-availability-title {
  font-size: 14px;
  color: var(--green);
  font-weight: 700;
}

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

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.contact-form-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.contact-form-field input,
.contact-form-field textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 100%;
}

.contact-form-field input:focus,
.contact-form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
}

.contact-form-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.contact-form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.contact-form-submit:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.contact-form-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.contact-form-hints span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Footer
   -------------------------------------------------------------------------- */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-built {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-built .lucide-heart {
  width: 12px;
  height: 12px;
  color: var(--red);
}

/* Responsive
   ==========================================================================
   Breakpoints:
     - <= 1024px : large tablet — keep desktop, just tighten padding
     - <= 900px  : tablet — 2-col grids, hamburger, hide sphere
     - <= 600px  : phone — 1-col, stacked buttons
     - <= 380px  : tiny phone — minimal padding, smallest font sizes
   ==========================================================================
*/

/* Anti-overflow safety net — applies at every viewport */
html, body { max-width: 100%; overflow-x: hidden; }

.contact-card-value,
.contact-card-hint,
.tc-summary,
.tc-bullets li,
.proj-desc,
.hero-intro {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 1024px) {
  .container { padding: 0 28px; }
  .navbar { padding: 0 28px; }
}

@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .navbar { padding: 0 24px; }

  /* Navbar — hamburger drawer */
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 24px 24px;
    background: rgba(9, 9, 11, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li { width: 100%; }
  .nav-links a {
    font-size: 15px;
    padding: 12px 6px;
    width: 100%;
  }

  /* Hero — content stacks, sphere hidden, no forced 100vh on mobile */
  .hero {
    min-height: auto;
    padding: 120px 0 60px;
  }
  .hero .container {
    padding: 0 24px;
    display: block;
    min-height: 0;
  }
  .hero-grid {
    display: block;
    width: 100%;
  }
  .hero-text { max-width: none; }
  .hero-visual { display: none; }
  .hero-title { font-size: 48px; letter-spacing: -1.5px; }
  .hero-btns { flex-wrap: wrap; }

  /* Skills */
  .skills-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Timeline */
  .timeline { padding-left: 48px; }
  .timeline::before { left: 18px; }
  .timeline-dot { left: -48px; width: 38px; height: 38px; }
  .timeline-dot .lucide-lg { width: 18px; height: 18px; }
  .timeline-card { padding: 24px; }
  .tc-top { flex-direction: column; gap: 10px; align-items: flex-start; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }
  .proj-preview { height: 200px; }
  .proj-actions { flex-wrap: wrap; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  /* Containers — tighter padding */
  .container { padding: 0 20px; }
  .navbar { padding: 0 20px; }
  .hero .container { padding: 0 20px; }

  /* Hero */
  .hero { padding: 100px 0 56px; }
  .hero-title { font-size: 36px; letter-spacing: -1px; line-height: 1.1; }
  .hero-intro { font-size: 14px; line-height: 1.65; margin-bottom: 32px; }
  .hero-btns { gap: 8px; flex-direction: column; align-items: stretch; }
  .hero-btns .btn { width: 100%; justify-content: center; padding: 12px 16px; }

  /* Skills */
  .skills-cards { grid-template-columns: 1fr; gap: 16px; }
  .skills-group { padding: 20px; }
  .skills-group-grid { gap: 12px; }
  .skill-item { width: 60px; }
  .skill-item i[class^="devicon-"],
  .skill-item i[class*=" devicon-"] { font-size: 26px; }

  /* Timeline */
  .timeline { padding-left: 36px; }
  .timeline::before { left: 14px; }
  .timeline-dot { left: -36px; width: 30px; height: 30px; }
  .timeline-dot .lucide-lg { width: 14px; height: 14px; }
  .timeline-card { padding: 18px; }
  .tc-role { font-size: 17px; }
  .tc-company { font-size: 13px; }
  .tc-tag { font-size: 10px; padding: 4px 10px; }

  /* Section spacing */
  .section { padding: 60px 0; }
  .section-tag { font-size: 11px; letter-spacing: 2px; }
  .section-header { margin-bottom: 32px; }

  /* Contact */
  .contact-section { padding: 60px 0; }
  .contact-intro { margin-bottom: 32px; }
  .contact-title { font-size: 26px; }
  .contact-form { padding: 20px; gap: 14px; }
  .contact-card { padding: 16px; gap: 12px; }
  .contact-card-icon { width: 38px; height: 38px; }
  .contact-card-value { font-size: 14px; }
  .contact-form-hints { flex-direction: column; gap: 8px; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 380px) {
  .container,
  .navbar,
  .hero .container { padding: 0 16px; }

  .hero-title { font-size: 30px; letter-spacing: -0.5px; }
  .hero-intro { font-size: 13px; }
  .hero-btns .btn { font-size: 12px; }

  .skills-group { padding: 16px; }
  .skills-group-grid { gap: 10px; }

  .contact-form { padding: 16px; }
  .timeline-card { padding: 16px; }
}
