:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f6f8;
  --color-text: #1b1f23;
  --color-muted: #5c6370;
  --color-accent: #ff8200;
  --color-accent-dark: #c25e00;
  --color-border: #e3e6ea;
  --max-width: 1080px;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  border-top: 3px solid #ff8200;
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-ut {
  background: #ff8200;
  color: #ffffff;
  text-decoration: none;
}

.badge-ut:hover {
  background: #e07200;
}

.site-header nav {
  display: flex;
  align-items: center;
}

.site-header nav a {
  margin-left: 24px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a:hover {
  color: var(--color-accent);
}

.site-header nav a.active {
  color: var(--color-accent);
  font-weight: 600;
}

.site-header nav a.nav-icon {
  display: inline-flex;
  align-items: center;
  color: #0a66c2;
  transition: color 0.15s ease;
  margin-left: 20px;
}

.site-header nav a.nav-icon:hover {
  color: #004182;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin-left: 14px;
  border: 2px solid var(--color-border);
  display: block;
}

/* Hero — split: name left, headshot right */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #241a12 0%, #3d2000 45%, #a85400 100%);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-text {
  padding: 104px 24px 96px;
  max-width: 680px;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin: 0;
  color: #fff;
  letter-spacing: -0.015em;
}

.hero-rule {
  width: 64px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
  margin: 20px 0;
}

.hero-title {
  margin: 0 0 32px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero .cta {
  background: #ffffff;
  color: var(--color-accent-dark);
}

.hero .cta:hover {
  background: rgba(255, 255, 255, 0.88);
  opacity: 1;
}

.hero .cta-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.hero .cta-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  opacity: 1;
}


/* CTA */
.cta {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: opacity 0.15s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.cta:hover {
  opacity: 0.88;
}

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

.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Sections */
.section {
  padding: 64px 0;
}

.section.tint {
  background: #fff3e6;
}

.section.alt {
  background: linear-gradient(180deg, #3d2000 0%, #a85400 50%, #ff8200 100%);
  color: #fff;
}

.section.alt h2 {
  color: #fff;
}

.section.alt .card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(2px);
}

.section.alt .card h3 {
  color: #fff;
}

.section.alt .card p {
  color: rgba(255, 255, 255, 0.8);
}

.section.alt p a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.6);
}

.section h2 {
  font-size: 1.8rem;
  margin-top: 0;
}

.section p a {
  color: var(--color-accent);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 4px;
}

.card-date {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 10px;
}

.card p:last-child {
  margin: 0;
}

/* Contact form */
.contact-form {
  margin-top: 24px;
  max-width: 600px;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row input {
  flex: 1;
  min-width: 0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  outline: none;
  transition: border-color 0.15s ease;
  display: block;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255, 130, 0, 0.18);
}

.contact-form textarea {
  resize: vertical;
  margin-bottom: 16px;
}

.form-feedback {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--color-accent);
  display: none;
}

/* Resume page */
.resume-banner {
  background: linear-gradient(135deg, #3d2000 0%, #a85400 60%, #ff8200 100%);
  padding: 48px 0;
  color: #fff;
}

.resume-banner h1 {
  margin: 0 0 8px;
  color: #fff;
}

.resume-banner .subtitle {
  margin: 3px 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.resume-banner .subtitle a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.resume-banner .subtitle a:hover {
  text-decoration-color: rgba(255, 255, 255, 0.9);
}

.resume-banner .cta {
  background: #fff;
  color: var(--color-accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.resume-banner .cta:hover {
  background: rgba(255, 255, 255, 0.88);
  opacity: 1;
}

.resume-section {
  padding: 40px 0;
  background: var(--color-bg);
}

.resume-section.tint {
  background: #fff3e6;
}

.resume-block h2 {
  font-size: 1.2rem;
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
  color: var(--color-text);
  display: inline-block;
}

.resume-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.resume-header h1 {
  margin: 0 0 6px;
}

.resume-header .subtitle {
  margin: 2px 0;
  font-size: 0.95rem;
}

.resume-header .subtitle a {
  color: var(--color-accent);
  text-decoration: none;
}

.resume-header .subtitle a:hover {
  text-decoration: underline;
}

.resume-block {
  margin-bottom: 36px;
}

.resume-block h2 {
  font-size: 1.3rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
  margin-bottom: 18px;
}

.resume-entry {
  margin-bottom: 20px;
}

.resume-entry-head,
.resume-entry-sub {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-meta {
  color: var(--color-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.resume-entry-sub .sub-title {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.pdf-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  background: rgba(255, 130, 0, 0.1);
  border: 1px solid rgba(255, 130, 0, 0.35);
  border-radius: 999px;
  padding: 2px 9px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pdf-tag:hover {
  background: rgba(255, 130, 0, 0.18);
  border-color: var(--color-accent);
}

.pdf-tag:focus-visible {
  outline: 2px solid var(--color-accent-dark);
  outline-offset: 2px;
}

.resume-entry ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.resume-entry li,
.resume-block > ul li {
  color: var(--color-muted);
  margin-bottom: 6px;
}

/* Transcript table */
.table-scroll {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.transcript-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  white-space: nowrap;
}

.transcript-table th,
.transcript-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}

.transcript-table thead th {
  background: var(--color-bg-alt);
  color: var(--color-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.transcript-table tbody tr:nth-child(even) {
  background: var(--color-bg-alt);
}

.transcript-table tbody tr:last-child td {
  border-bottom: none;
  font-weight: 600;
}

/* Bridge banner */
.bridge-banner {
  width: 100%;
  height: 320px;
  overflow: hidden;
}

.bridge-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

/* Paper page */
.paper-banner {
  position: relative;
  padding: 72px 0 56px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #3d2000 0%, #a85400 60%, #ff8200 100%);
}

.paper-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("london-bridge.jpg") center 45% / cover no-repeat;
  opacity: 0.22;
}

.paper-banner .container {
  position: relative;
  z-index: 1;
}

.paper-banner h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 2.1rem;
  max-width: 780px;
  line-height: 1.25;
}

.paper-banner .paper-byline {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
}

.paper-banner .cta {
  background: #fff;
  color: var(--color-accent-dark);
}

.paper-banner .cta:hover {
  background: rgba(255, 255, 255, 0.88);
  opacity: 1;
}

.paper-banner .cta-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.paper-banner .cta-outline:hover {
  background: rgba(255, 255, 255, 0.14);
}

.paper-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.paper-body {
  max-width: 760px;
}

.paper-body h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.paper-lead {
  font-size: 1.08rem;
  line-height: 1.75;
}

.paper-thesis {
  border-left: 4px solid var(--color-accent);
  background: var(--color-bg-alt);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 26px 0;
  font-size: 1.02rem;
}

.paper-thesis strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-dark);
  margin-bottom: 8px;
}

.findings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 26px;
}

.finding {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 22px;
}

.finding h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.finding p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.94rem;
}

.finding .stat {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  line-height: 1.1;
  margin-bottom: 6px;
}

.pdf-frame {
  width: 100%;
  height: 820px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-top: 22px;
  background: var(--color-bg-alt);
}

.pdf-fallback {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 12px;
}

/* Transcript page */
.gpa-banner {
  background: linear-gradient(135deg, #3d2000 0%, #a85400 60%, #ff8200 100%);
  padding: 56px 0;
  color: #fff;
}

.gpa-banner h1 {
  margin: 0 0 6px;
  color: #fff;
}

.gpa-banner .subtitle {
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
}

.gpa-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
  max-width: 760px;
}

.gpa-stat {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.gpa-stat .num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.gpa-stat .label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 6px;
}

.honors {
  margin-top: 22px;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-left: 4px solid #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
}

.honors-title {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.85);
}

.honors-lead {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.honors-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.honors-terms li {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--color-accent-dark);
}

.term {
  margin-bottom: 34px;
}

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

.term-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.term-head h2 {
  font-size: 1.15rem;
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.term-flag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff0dd;
  color: var(--color-accent-dark);
  border: 1px solid #ffd0a0;
}

.course-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.course-table th,
.course-table td {
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border);
}

.course-table thead th {
  background: var(--color-bg-alt);
  color: var(--color-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.course-table th:last-child,
.course-table td:last-child {
  text-align: right;
  width: 90px;
  white-space: nowrap;
}

.course-table tbody tr:last-child td {
  border-bottom: none;
}

.grade {
  font-weight: 700;
  color: var(--color-accent-dark);
}

.grade-pending {
  color: var(--color-muted);
  font-weight: 500;
  font-size: 0.88rem;
}

.transcript-note {
  font-size: 0.88rem;
  color: var(--color-muted);
  max-width: 760px;
  margin-top: 8px;
}

/* Footer */
.site-footer {
  padding: 28px 0;
  text-align: center;
  font-size: 0.9rem;
  background: #3d2000;
  color: rgba(255, 255, 255, 0.6);
}

/* Mobile */
@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .site-header nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .site-header nav a,
  .nav-icon {
    margin-left: 0;
    margin-right: 18px;
    font-size: 0.88rem;
  }

  .badge {
    display: none;
  }

  .hero-text {
    padding: 56px 24px 52px;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero-title {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .resume-entry-head,
  .resume-entry-sub {
    flex-direction: column;
    gap: 2px;
  }

  .resume-meta {
    white-space: normal;
  }

  .resume-header {
    flex-direction: column;
  }

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