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

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  --bg:           #0D0E11;
  --surface:      #131619;
  --surface-up:   #191D23;
  --border:       rgba(237, 232, 223, 0.07);
  --border-hi:    rgba(237, 232, 223, 0.13);
  --text:         #EDE8DF;
  --text-2:       rgba(237, 232, 223, 0.70);
  --text-3:       rgba(237, 232, 223, 0.36);
  --amber:        #D07B38;
  --amber-dim:    rgba(208, 123, 56, 0.11);
  --amber-mid:    rgba(208, 123, 56, 0.42);
  --green:        #5ABC8C;
  --green-dim:    rgba(90, 188, 140, 0.4);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Instrument Sans', Helvetica, sans-serif;
  --font-mono:  'JetBrains Mono', 'Courier New', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:   0.15s ease;
  --t-med:    0.25s ease;
}

/* ── Base ──────────────────────────────────────────────────── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  padding: 56px 20px 100px;
}

/* Film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.025;
  pointer-events: none;
  z-index: 999;
}

/* ── Atmospheric background ────────────────────────────────── */
.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 55% at 50% -8%, rgba(200, 95, 38, 0.15) 0%, transparent 65%),
    radial-gradient(ellipse 35% 30% at 85% 88%, rgba(130, 55, 18, 0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: 580px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Page entry animations ──────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

header { animation: fadeUp 0.7s 0.05s var(--ease-out) both; }
.tabs  { animation: fadeUp 0.7s 0.16s var(--ease-out) both; }
main   { animation: fadeUp 0.7s 0.24s var(--ease-out) both; }

/* ── Header ────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 44px;
}

.avatar-wrap {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1.5px var(--amber), 0 0 0 5px var(--amber-dim);
  margin-top: 5px;
}

.logo-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 14px;
}

.header-text h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
}

.subtitle {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--text-3);
  line-height: 1.5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(90, 188, 140, 0.68);
}

.status-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2.5s var(--ease-out) infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 var(--green-dim); }
  55%       { box-shadow: 0 0 0 6px rgba(90, 188, 140, 0); }
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 34px;
}

.tab {
  background: none;
  border: none;
  padding: 0 18px 11px;
  margin-bottom: -1px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  cursor: pointer;
  transition: color var(--t-fast);
  position: relative;
  outline: none;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background-color: transparent;
  transition: background-color var(--t-fast);
}

.tab:hover       { color: var(--text-2); }

.tab.active {
  color: var(--amber);
}

.tab.active::after {
  background-color: var(--amber);
}

/* ── Tab panels ────────────────────────────────────────────── */
.tab-content { display: none; }

.tab-content.active {
  display: block;
  animation: fadeUp 0.35s var(--ease-out) both;
}

/* ── About ─────────────────────────────────────────────────── */
#about p {
  font-size: 0.925rem;
  color: var(--text-2);
  margin-bottom: 18px;
  line-height: 1.78;
}

#about p:last-child { margin-bottom: 0; }

/* Links */
a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber-mid);
  transition: color var(--t-fast), border-color var(--t-fast);
}

a:hover {
  color: #EDE8DF;
  border-bottom-color: var(--amber);
}

/* ── Projects ──────────────────────────────────────────────── */
.project {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  align-items: flex-start;
}

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

.project-image {
  width: 60px;
  height: 60px;
  min-width: 60px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--surface);
}

.project-content {
  flex: 1;
}

#projects h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

#projects p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── Services ──────────────────────────────────────────────── */
.service {
  padding: 20px 20px 20px 16px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--amber-mid);
  border-radius: 4px;
  transition: background var(--t-fast), border-left-color var(--t-fast);
}

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

.service:hover {
  background: var(--surface-up);
  border-left-color: var(--amber);
}

.service h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.25;
}

.service p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.68;
}

.service ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.service ul li {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.55;
  padding-left: 14px;
  position: relative;
}

.service ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--amber-mid);
  font-size: 0.75rem;
  line-height: 1.7;
}

/* ── Experience ────────────────────────────────────────────── */
.exp-item {
  padding-bottom: 20px;
}

#experience > .exp-item + .exp-item {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 2px;
}

.exp-company {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.exp-duration {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 300;
  color: var(--text-3);
  white-space: nowrap;
  letter-spacing: 0.025em;
}

.exp-role {
  font-size: 0.85rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-2);
  margin-top: 2px;
}

.exp-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 300;
  color: var(--text-3);
  letter-spacing: 0.02em;
  margin-top: 3px;
  margin-bottom: 8px;
}

.exp-desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── Education ─────────────────────────────────────────────── */
.edu-section {
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.edu-section .exp-item {
  padding-bottom: 0;
}

/* ── Contact ───────────────────────────────────────────────── */
#contact > p {
  font-size: 0.925rem;
  color: var(--text-2);
  margin-bottom: 28px;
  line-height: 1.78;
}

.contact-links {
  display: flex;
  flex-direction: column;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-2);
  font-size: 0.875rem;
  text-decoration: none;
  padding: 15px 0;
  border-top: 1px solid var(--border);
  transition: color var(--t-fast);
}

.contact-link:last-child {
  border-bottom: 1px solid var(--border);
}

.contact-link::after {
  content: '↗';
  font-size: 0.78rem;
  opacity: 0;
  transform: translate(-5px, 5px);
  transition: opacity var(--t-fast), transform var(--t-fast);
  color: var(--amber);
  flex-shrink: 0;
}

.contact-link:hover {
  color: var(--text);
}

.contact-link:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
  body { padding: 36px 16px 80px; }

  header {
    gap: 16px;
  }

  .header-text h1 { font-size: 1.8rem; }

  .tab {
    padding: 0 12px 11px;
    font-size: 0.68rem;
  }
}
