:root {
  --bg-1: #070f11;
  --bg-2: #122c33;
  --accent: #9ad5d6;
  --accent-2: #f2b5a8;
  --accent-3: #b5d67c;
  --ink: #e8f1f2;
  --muted: #9fb6bd;
  --card: rgba(18, 44, 51, 0.6);
  --border: rgba(154, 213, 214, 0.25);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --cursor-blink: 1.5s;
  font-family: "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background-color: #070f11;
}

body {
  margin: 0;
  background-color: #070f11;
  background: linear-gradient(
    -45deg,
    #070f11,
    #122c33,
    #0d2217,
    #1a1230,
    #122c33,
    #070f11
  );
  background-size: 400% 400%;
  animation: gradientShift 18s ease infinite;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6vw;
  background: rgba(12, 27, 31, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: opacity 0.2s ease, transform 0.15s ease;
  opacity: 0.75;
}

.brand-icon-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.brand-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #0c1b1f;
  border-radius: 50%;
  font-weight: 700;
  letter-spacing: 1px;
  border: 2px solid #0c1b1f;
  box-shadow: 0 6px 0 #0c1b1f;
  object-fit: cover;
}

.brand-text {
  margin-left: 16px;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-tagline {
  font-size: 13px;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 14px;
  font-size: 14px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 10px;
  transition: transform 0.1s ease, background 0.2s ease, color 0.2s ease;
}

.nav a:hover {
  background: rgba(154, 213, 214, 0.15);
  color: var(--accent);
  transform: translateY(-2px);
}

.nav a.active {
  color: #FF7F50;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 127, 80, 0.8), 0 0 20px rgba(255, 127, 80, 0.4);
  background: rgba(255, 127, 80, 0.1);
  box-shadow: 0 0 10px rgba(255, 127, 80, 0.3), 0 0 24px rgba(255, 127, 80, 0.15), inset 0 0 10px rgba(255, 127, 80, 0.08);
  border-radius: 10px;
}

.nav .pill {
  border: 1px solid var(--border);
}

.hamburger {
  background: rgba(12, 27, 31, 0.9);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 42px;
  justify-content: center;
  padding: 8px;
  width: 42px;
}

.hamburger span {
  background: var(--ink);
  height: 3px;
  display: block;
  width: 100%;
  border-radius: 999px;
}

.mobile-menu {
  background: rgba(12, 27, 31, 0.95);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: none;
  margin: 0;
  padding: 12px;
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 420px);
  z-index: 20;
}

.mobile-menu a {
  border-bottom: 1px solid rgba(154, 213, 214, 0.2);
  display: block;
  padding: 10px 0;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

main {
  padding: 32px 6vw 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

section[id] {
  scroll-margin-top: 90px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: center;
}

.hero-centered {
  gap: 32px;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 20px 0 0;
  position: relative;
}

.hero-cloud {
  position: absolute;
  top: -80px;
  left: -109px;
  right: -110px;
  bottom: -175px;
  background: url('./resources/images/Cloud.png') center / contain no-repeat;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 75%);
  mask-image: linear-gradient(to bottom, black 30%, transparent 75%);
  -webkit-mask-size: 80% 100%;
  mask-size: 80% 100%;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}

.hero-centered > *:not(.hero-cloud) {
  position: relative;
  z-index: 2;
}


.hero-text {
  gap: 6px;
  display: grid;
  justify-items: center;
  animation: heroTextEntrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.highlight-name {
  color: #FF7F50;
  text-shadow: 0 0 10px rgba(255, 136, 72, 0.859), 0 1px 4px rgba(0,0,0,0.85), 0 0 12px rgba(0,0,0,0.5);
}

.portrait-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(460px, 100%);
}

.portrait-frame {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 2px solid #0c1b1f;
  overflow: hidden;
  background: #0c1b1f;
  box-shadow:
    0 12px 0 #0c1b1f,
    0 0 0 6px rgba(154, 213, 214, 0.12),
    0 0 32px rgba(154, 213, 214, 0.18),
    var(--shadow);
  animation: portraitEntrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-text h1 {
  margin: 10px 0;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.85), 0 0 12px rgba(0,0,0,0.5);
}

.typewriter-group {
  gap: 8px;
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  animation: float2 8s ease-in-out infinite;
}

.typewriter {
  max-width: 0;
  border-right: 0 solid var(--ink);
  display: inline-block;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  width: auto;
}

.typewriter.active {
  animation:
    typing var(--typing-duration, 2s) steps(var(--chars, 8), end) var(--typing-delay, 0s) forwards,
    blink var(--cursor-blink, 0.8s) step-end infinite calc(var(--typing-duration, 2s) + var(--typing-delay, 0s));
  border-right-width: 3px;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.85));
  word-break: break-word;
}

.typewriter.no-cursor.active {
  border-right-width: 0;
  animation: typing var(--typing-duration, 2s) steps(var(--chars, 8), end) var(--typing-delay, 0s) forwards;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 2.8s ease forwards;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-3);
  text-shadow:
    0 0 3px rgba(0,0,0,1),
    0 1px 6px rgba(0,0,0,1),
    0 0 18px rgba(0,0,0,0.9);
  -webkit-text-stroke: 0.4px rgba(0,0,0,0.7);
}

.lede {
  color: var(--ink);
  max-width: 750px;
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0,0,0,0.85), 0 0 12px rgba(0,0,0,0.5);
}

.cta-row {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  border: 2px solid #0c1b1f;
  box-shadow: 0 6px 0 #0c1b1f;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0c1b1f;
}

.btn.ghost {
  border-color: var(--border);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.6);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 #0c1b1f;
}

.status-chip {
  display: inline-flex;
  position: relative;
  isolation: isolate;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(181, 214, 124, 0.15);
  border: 1px solid rgba(181, 214, 124, 0.5);
  color: var(--accent-3);
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-left: auto;
  margin-right: auto;
}

.status-chip::before {
  content: "";
  position: absolute;
  inset: -6px -10px;
  background: radial-gradient(circle at 20% 20%, rgba(181, 214, 124, 0.25), transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(154, 213, 214, 0.25), transparent 50%);
  opacity: 0.9;
  filter: blur(12px);
  z-index: -1;
}

.status-wrapper {
  display: flex;
  justify-content: center;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.contact-chip {
  background: rgba(154, 213, 214, 0.16);
  color: var(--ink);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.contact-chip:hover {
  background: rgba(154, 213, 214, 0.28);
  border-color: rgba(154, 213, 214, 0.6);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.panel {
  background: rgba(12, 27, 31, 0.8);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

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

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 22px;
  letter-spacing: 1px;
  transition: font-weight 0.2s ease;
}

.panel.active-section .panel-title {
  font-weight: 900;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 15px;
}

.panel-grid {
  display: grid;
  gap: 16px;
}

.panel-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.panel-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.focus-grid .card {
  min-height: 180px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(154, 213, 214, 0.12);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--accent);
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 4px solid var(--accent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.project-card .link {
  color: var(--accent-2);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-end;
  margin-top: auto;
  padding-top: 15px;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(154, 213, 214, 0.1) 100%);
}

.timeline-item {
  position: relative;
  padding: 0 0 28px 16px;
  background: none;
  border: none;
  border-radius: 0;
}

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

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 2px solid var(--accent);
  transition: background 0.2s ease, box-shadow 0.2s ease;
  z-index: 1;
}

.timeline-item:hover .timeline-dot {
  background: #FF7F50;
  border-color: #FF7F50;
  box-shadow: 0 0 8px rgba(255, 127, 80, 0.35);
}

.timeline-date {
  color: var(--accent-3);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}

.timeline-role {
  font-weight: 700;
  margin-bottom: 2px;
}

.timeline-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.resume-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resume-modal[hidden] {
  display: none;
}

.resume-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.resume-modal-content {
  position: relative;
  z-index: 1;
  width: min(860px, 92vw);
  height: min(90vh, 1100px);
  background: rgba(12, 27, 31, 0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.resume-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.resume-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resume-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  padding: 6px 10px;
  transition: background 0.2s ease;
}

.resume-close:hover {
  background: rgba(154, 213, 214, 0.15);
}

.resume-iframe {
  flex: 1;
  width: 100%;
  border: none;
}

.site-footer {
  padding: 24px 6vw 40px;
  color: var(--muted);
  text-align: center;
}

.contact .links {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.starfield,
.grid-overlay,
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.aurora {
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  will-change: transform;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -10%;
  left: -5%;
  animation: blobDrift1 20s ease-in-out infinite;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  top: 30%;
  right: -10%;
  animation: blobDrift2 26s ease-in-out infinite;
}

.blob-3 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-3) 0%, transparent 70%);
  bottom: -15%;
  left: 20%;
  animation: blobDrift3 22s ease-in-out infinite;
}

.blob-4 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: 60%;
  left: 60%;
  animation: blobDrift4 30s ease-in-out infinite;
}

@keyframes blobDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(80px, 60px) scale(1.1); }
  66%       { transform: translate(-40px, 100px) scale(0.95); }
}

@keyframes blobDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-100px, 60px) scale(1.05); }
  66%       { transform: translate(-60px, -80px) scale(1.15); }
}

@keyframes blobDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(60px, -80px) scale(1.1); }
}

@keyframes blobDrift4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%       { transform: translate(-80px, -60px) scale(1.1); }
  75%       { transform: translate(60px, 40px) scale(0.9); }
}

.starfield {
  width: 100%;
  height: 100%;
}

.grid-overlay {
  background-size: 64px 64px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  mix-blend-mode: soft-light;
}


@keyframes portraitEntrance {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroTextEntrance {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(80px); }
}

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

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

@keyframes typing {
  from { max-width: 0; }
  to { max-width: 100%; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 50% { border-color: var(--ink); }
  50.01%, 100% { border-color: transparent; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .hamburger { display: inline-flex; }
  .site-header { justify-content: space-between; }

  .hero-centered {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hero-text { justify-items: center; }
  .typewriter-group { justify-content: center; }
  .contact-row, .cta-row { justify-content: center; }
  .status-wrapper { justify-content: center; }

  .hero-cloud {
    display: none;
  }

  .eyebrow {
    text-shadow: none;
    -webkit-text-stroke: 0;
  }

  .hero-text h1 {
    text-shadow: none;
  }

  .lede {
    text-shadow: none;
  }

  .highlight-name {
    text-shadow: 0 0 10px rgba(255, 136, 72, 0.859);
  }
}
