/* ═══════════════════════════════════════════════════════
   css/main.css  —  Variables, reset, base, typography
═══════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────── */
:root {
  /* Colours */
  --bg:          #0A0A0F;
  --bg-alt:      #0F0F18;
  --bg-card:     #12121C;
  --accent:      #E94560;
  --accent-cyan: #00FFFF;
  --text:        #E8E8F0;
  --text-muted:  #6E6E8A;
  --border:      rgba(232,232,240,0.08);

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  /* Spacing */
  --section-pad:  140px;
  --container:    1200px;
  --radius:       4px;

  /* Transitions */
  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light mode overrides */
[data-theme="light"] {
  --bg:          #F5F5F8;
  --bg-alt:      #EBEBF0;
  --bg-card:     #FFFFFF;
  --text:        #0A0A0F;
  --text-muted:  #6E6E8A;
  --border:      rgba(10,10,15,0.1);
}

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

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

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  cursor: none;
}

/* Restore cursor on touch devices */
@media (hover: none) {
  body { cursor: auto; }
}

img, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: none; font-family: inherit; border: none; background: none; }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; }

.accent { color: var(--accent); }

/* ── Layout Helpers ─────────────────────────────────── */
.container {
  width: min(var(--container), calc(100% - 3rem));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-pad);
}

/* ── Section Labels ─────────────────────────────────── */
.section-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.section-number {
  font-family: var(--font-mono);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 300;
  color: var(--accent);
  opacity: 0.18;
  line-height: 1;
  letter-spacing: -2px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-heading {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 3rem;
  line-height: 1.15;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

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

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover::after { transform: translateX(0); }

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
}

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

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

/* ── Custom Cursor ──────────────────────────────────── */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
}

.cursor-ring {
  width: 30px; height: 30px;
  border: 1.5px solid var(--accent);
  opacity: 0.6;
  transition: width 0.2s, height 0.2s, border-color 0.2s, opacity 0.2s;
}

.cursor-ring.hover {
  width: 50px; height: 50px;
  border-color: var(--accent-cyan);
  opacity: 0.8;
}

/* ── About Section ──────────────────────────────────── */
.about-section { background: var(--bg-alt); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 6rem;
  align-items: center;
}

.about-heading {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.about-stats {
  display: flex;
  gap: 3rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Photo Frame */
.photo-frame {
  position: relative;
  aspect-ratio: 3/4;
  max-width: 360px;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  filter: grayscale(20%);
  transition: filter var(--transition);
}

.photo-frame:hover img { filter: grayscale(0%); }

.photo-decoration {
  position: absolute;
  inset: -12px -12px auto auto;
  width: 60%;
  height: 60%;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  z-index: -1;
}

/* ── Skills Section ─────────────────────────────────── */
.skills-philosophy {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 600px;
  margin-bottom: 3rem;
}

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

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.skill-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.skill-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 60px;
  transition: transform var(--transition);
}

.skill-icon-item img {
  width: 40px;
  height: 40px;
  filter: grayscale(40%);
  transition: filter var(--transition), drop-shadow var(--transition);
}

.skill-icon-item:hover img {
  filter: grayscale(0%) drop-shadow(0 0 8px var(--accent-cyan));
}

.skill-icon-item:hover { transform: translateY(-4px); }

.skill-icon-item span {
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-align: center;
}

/* ── Experience / Timeline ──────────────────────────── */
.experience-section { background: var(--bg-alt); }

.timeline {
  position: relative;
  padding-left: 2.5rem;
}

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

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

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  transition: background var(--transition);
}

.timeline-item:hover .timeline-dot { background: var(--accent); }

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.timeline-role {
  font-size: 1.2rem;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline-bullets {
  list-style: none;
}

.timeline-bullets li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.35rem;
}

.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Contact Section ────────────────────────────────── */
.contact-heading { font-size: clamp(2.5rem, 6vw, 4rem); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  transition: border-color var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-success { color: var(--accent-cyan); font-size: 0.85rem; margin-top: 1rem; }
.form-error   { color: var(--accent);      font-size: 0.85rem; margin-top: 1rem; }

.contact-direct {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.contact-email {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
  margin-bottom: 2rem;
  transition: color var(--transition);
}

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

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition), transform 0.5s;
}

.social-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(360deg);
}

/* ── Footer ─────────────────────────────────────────── */
.footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.back-to-top {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}
