
:root {
  --bg: #f5f3ef;
  --ink: #1d1d1f;
  --accent: #ff6a00;
  --accent-dark: #d75400;
  --shadow: rgba(11, 15, 18, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 0, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 170, 82, 0.14), transparent 20%),
    var(--bg);
  color: var(--ink);
}

p,
.project-card p,
.about-text p,
.photography-heading p,
.contact p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.7;
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: "Shrikhand", cursive;
  font-weight: 400;
}

h2 {
  color: var(--accent);
}

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: rgba(17, 17, 17, 0.92);
  color: #e0e0e0;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

header {
  background: #111;
  color: #e0e0e0;
}

nav h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
}

nav a {
  color: #e0e0e0;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.hero {
  position: relative;
  background: linear-gradient(135deg, #111 0%, #1c1d20 30%, #2b2b2b 100%);
  color: #e0e0e0;
  text-align: center;
  padding: 120px 20px 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 128, 0, 0.14), transparent 42%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  margin-bottom: 10px;
  color: #ff9d4d;
}

.about-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 50px;
  padding: 30px 20px 0;
}

.about-photo-frame {
  width: min(28vw, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.about-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 6%;
  transform: translateY(12px) scale(1.15);
}

.about-photo-frame:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.3);
}

.about-text {
  max-width: 620px;
  text-align: left;
  color: rgba(255, 255, 255, 0.88);
}

.about-text h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.about-text p {
  margin: 0;
  line-height: 1.75;
  font-size: 1.02rem;
}

.resume-section {
  padding: 58px 20px 64px;
  text-align: center;
  background: #fff8ed;
}

.resume-section h2 {
  margin: 0 0 8px;
}

.resume-section p:not(.section-kicker) {
  margin: 0;
}

.resume-link {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}

.resume-link:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.projects-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1220px;
  margin: 0 auto;
  padding: 38px 20px 6px;
  gap: 22px;
  align-items: start;
}

.project-timeline {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 18px 14px 22px 10px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff8ed;
  box-shadow: 0 16px 30px rgba(215, 84, 0, 0.24);
}

.timeline-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff8ed;
  font-weight: 800;
  margin-bottom: 18px;
  padding-left: 24px;
}

.timeline-track {
  position: relative;
  padding-left: 24px;
  margin-left: 4px;
}

.timeline-track::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 248, 237, 0.42);
}

.timeline-fill {
  position: absolute;
  left: 10px;
  top: 0;
  width: 2px;
  height: 0;
  background: #fff8ed;
  transition: height 0.35s ease;
}

.timeline-months {
  position: relative;
  display: grid;
  gap: 22px;
}

.timeline-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 0 0 18px 0;
  margin: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transform: scale(var(--timeline-scale, 0.9));
  transform-origin: left center;
  transition: color 0.25s ease, transform 0.35s ease;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: rgba(255, 248, 237, 0.25);
  border: 2px solid rgba(255, 248, 237, 0.8);
  box-shadow: 0 0 0 4px rgba(255, 248, 237, 0.12);
  transition: all 0.25s ease;
}

.timeline-text {
  display: block;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #fff8ed;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  min-height: 92px;
  justify-content: center;
  transition: color 0.25s ease, transform 0.25s ease;
}

.timeline-text small {
  color: rgba(255, 248, 237, 0.75);
  font-size: 0.72em;
}

.timeline-step.active .timeline-dot {
  background: var(--accent);
  border-color: #fff8ed;
  box-shadow: 0 0 0 6px rgba(255, 248, 237, 0.22);
}

.timeline-step.active .timeline-text {
  color: #fff;
  font-weight: 800;
}

.projects {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.projects .project-card[data-project="level1-rocket"] {
  order: 1;
}

.projects .project-card[data-project="irec-rocket"] {
  order: 2;
}

.projects .project-card[data-project="apogee-sim"] {
  order: 3;
}

.projects .project-card[data-project="drone"] {
  order: 4;
}

.project-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(45, 48, 52, 0.98), rgba(26, 28, 32, 0.98));
  color: #e6e9ee;
  padding: 16px 18px 18px;
  border-radius: 14px;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.14);
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  transform: perspective(1100px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) translateY(0);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 65%);
}

.project-card:hover {
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.2);
}

.project-card h3 {
  margin: 0 0 4px;
  color: #ff8a3d;
  font-size: clamp(1.5rem, 2vw, 2.3rem);
}

.project-card p {
  margin-top: 10px;
  line-height: 1.55;
  color: rgba(230, 233, 238, 0.9);
}

.rocket-project {
  padding: 18px 18px 20px;
}

.rocket-project-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
  margin-top: 12px;
}

.rocket-photo-stack {
  display: grid;
  gap: 8px;
}

.rocket-photo-stack img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

.rocket-project-side {
  min-width: 0;
}

.rocket-project-side .project-description {
  margin-top: 18px;
}

.rocket-project .project-description {
  font-size: 0.95rem;
}

.project-card img,
.project-card video {
  width: 100%;
  border-radius: 12px;
}

.project-flex {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 12px;
}

.project-media {
  width: 48%;
  flex: 0 0 48%;
}

.project-description {
  flex: 1;
  line-height: 1.6;
}

.project-breakdown {
  display: grid;
  gap: 10px;
}

.project-breakdown section {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.project-breakdown section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.project-breakdown h4 {
  margin: 0 0 4px;
  color: #ffb17b;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-breakdown p {
  margin: 0;
}

.project-link {
  display: inline-block;
  margin-top: 14px;
  color: #ff8a3d;
  font-weight: 700;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

.model-viewer {
  position: relative;
  width: 100%;
  height: min(28vw, 320px);
  min-height: 220px;
  background: radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.08), rgba(20, 24, 28, 1) 52%);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cad-detail-viewer {
  height: min(72vh, 780px);
  min-height: 520px;
  margin-top: 0;
}

.model-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.model-status {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.5;
  pointer-events: none;
  padding: 0 20px;
}

.project-video {
  display: block;
  width: 100%;
  height: 230px;
  margin-top: 0;
  border-radius: 12px;
  background: #15191f;
  object-fit: cover;
}

.media-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.media-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
}

.pdf-preview {
  display: block;
  width: 100%;
  height: 190px;
  margin-top: 10px;
  border: 1px solid rgba(89, 99, 109, 0.8);
  border-radius: 10px;
  object-fit: contain;
  background: #f5f5f5;
}

.pdf-label {
  margin: 10px 0 0;
  color: #ff8a3d;
  font-weight: 700;
}

.cad-section {
  padding: 88px 20px 104px;
  background: #17191d;
  color: #e6e9ee;
}

.cad-heading {
  max-width: 1100px;
  margin: 0 auto 34px;
}

.cad-heading h2 {
  margin: 0 0 8px;
  color: #ff8a3d;
  font-size: clamp(2rem, 5vw, 4.5rem);
}

.cad-heading > p:last-child {
  max-width: 560px;
  margin: 0;
  color: rgba(230, 233, 238, 0.78);
}

.cad-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}

.cad-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #f4f4f2;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  color: #fff;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cad-tile:nth-child(2n) {
  transform: translateY(18px);
}

.cad-tile:hover,
.cad-tile:focus-visible {
  z-index: 1;
  transform: translateY(-5px);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.32);
}

.cad-tile:nth-child(2n):hover,
.cad-tile:nth-child(2n):focus-visible {
  transform: translateY(13px);
}

.cad-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f4f4f2;
}

.cad-tile-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 42px 16px 14px;
  background: linear-gradient(transparent, rgba(13, 15, 18, 0.9));
}

.cad-tile-overlay strong {
  font-family: "Shrikhand", cursive;
  font-size: 1.15rem;
  font-weight: 400;
}

.cad-tile-overlay small {
  color: #ffb17b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cad-detail-page {
  min-height: 100vh;
  background: var(--bg);
}

.cad-detail {
  max-width: 1160px;
  margin: 0 auto;
  padding: 58px 20px 92px;
}

.back-link {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.cad-detail-heading {
  max-width: 760px;
  margin: 58px 0 34px;
}

.cad-detail-heading h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.05;
}

.cad-detail-heading > p:last-child {
  max-width: 650px;
  margin: 0;
}

.cad-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 30px;
  align-items: start;
}

.cad-detail-pdf {
  display: block;
  width: 100%;
  height: min(72vh, 780px);
  min-height: 520px;
  object-fit: contain;
  border: 1px solid rgba(29, 29, 31, 0.14);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 38px var(--shadow);
}

.cad-detail-media {
  min-width: 0;
}

.cad-detail-media .cad-detail-pdf {
  height: min(55vh, 520px);
  min-height: 320px;
}

.cad-detail-media .cad-detail-viewer {
  margin-top: 18px;
}

.cad-detail-notes {
  padding: 28px;
  border-top: 3px solid var(--accent);
  background: #fff;
  box-shadow: 0 14px 28px var(--shadow);
}

.cad-detail-notes p:not(.section-kicker) {
  margin-top: 0;
}

.cad-note-block {
  padding: 16px 0;
  border-bottom: 1px solid rgba(29, 29, 31, 0.12);
}

.cad-note-block:last-of-type {
  border-bottom: 0;
}

.cad-note-block h3 {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cad-note-block p {
  margin: 0;
}

.photography-section {
  overflow: hidden;
  padding: 90px 0 100px;
  background: linear-gradient(180deg, #f3d3b5 0%, #efc39a 100%);
  color: #241b1a;
}

.photography-heading {
  max-width: 1100px;
  margin: 0 auto 34px;
  padding: 0 20px;
}

.photography-heading h2 {
  margin: 0 0 8px;
  color: #241b1a;
  font-size: clamp(2rem, 5vw, 4.5rem);
}

.photography-heading > p:last-child {
  max-width: 520px;
  margin: 0;
  line-height: 1.7;
}

.section-kicker {
  margin: 0 0 10px;
  color: #a8452a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.photo-window {
  width: 100%;
  padding: 20px 0 48px;
  overflow: visible;
  clip-path: inset(-40px 0);
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.photo-track {
  display: flex;
  width: max-content;
  gap: 18px;
  animation: photo-drift 38s linear infinite;
}

.photo-slide {
  position: relative;
  width: clamp(210px, 28vw, 360px);
  aspect-ratio: 4 / 5;
  flex: 0 0 auto;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #241b1a;
  box-shadow: 0 14px 24px rgba(58, 29, 22, 0.22), inset 0 0 0 1px rgba(255, 248, 237, 0.38);
  transform: rotate(-2deg);
  transition: transform 0.25s ease;
}

.photo-slide:nth-child(3n) {
  transform: rotate(2deg) translateY(12px);
}

.photo-slide:nth-child(4n) {
  transform: rotate(-1deg) translateY(-8px);
}

.photo-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
  cursor: zoom-in;
  transition: transform 0.5s ease;
}

.photo-slide:hover img {
  transform: scale(1.06);
}

.photo-slide figcaption {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  color: #fff8ed;
  font-family: "Shrikhand", cursive;
  font-size: 1.1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.lightbox-open {
  overflow: hidden;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(20, 14, 13, 0.9);
  backdrop-filter: blur(8px);
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 248, 237, 0.55);
  border-radius: 50%;
  background: rgba(36, 27, 26, 0.65);
  color: #fff8ed;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.photo-lightbox-close:hover {
  background: var(--accent);
}

.photo-lightbox-frame {
  max-width: min(92vw, 1100px);
  max-height: 90vh;
  margin: 0;
  text-align: center;
}

.photo-lightbox-frame img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.photo-lightbox-frame figcaption {
  margin-top: 14px;
  color: #fff8ed;
  font-family: "Shrikhand", cursive;
  font-size: 1.15rem;
}

.contact {
  padding: 40px 20px 60px;
  text-align: center;
}

.contact p {
  margin: 12px 0;
}

.contact a {
  color: var(--accent-dark);
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

footer {
  text-align: center;
  padding: 20px;
  background: #111;
  color: #e0e0e0;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes photo-drift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 9px)); }
}

@media (prefers-reduced-motion: reduce) {
  .photo-track {
    animation: none;
  }

  .fade-in {
    transition: none;
  }
}

@media (max-width: 700px) {
  .projects-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .project-timeline {
    position: sticky;
    top: 78px;
    padding: 14px 8px 18px 6px;
  }

  .timeline-label {
    margin-bottom: 14px;
    padding-left: 14px;
    font-size: 0.58rem;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }

  .timeline-track {
    padding-left: 14px;
    margin-left: 2px;
  }

  .timeline-step {
    gap: 6px;
    padding-bottom: 14px;
  }

  .timeline-text {
    min-height: 82px;
    font-size: 0.68rem;
  }

  nav {
    flex-direction: column;
    gap: 10px;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .about-flex,
  .project-flex {
    flex-direction: column;
    align-items: stretch;
  }

  .about-photo-frame {
    width: min(62vw, 260px);
    margin: 0 auto;
  }

  .about-text {
    text-align: center;
  }

  .project-media {
    width: 100%;
    flex-basis: auto;
  }

  .rocket-project-layout {
    grid-template-columns: 1fr;
  }

  .rocket-project .project-video {
    height: 240px;
  }

}
