/* --- RESET & VARIABLES --- */
:root {
    --bg-color: #F0F0F0;
    /* Off-white/Light Grey */
    --text-color: #0A0A0A;
    --accent-color: #000000;
    --personal-accent: #369d1c;
    /* From old portfolio */
    --border-color: #000000;
    --border-thin: 1px solid var(--border-color);
    --border-thick: 3px solid var(--border-color);
    --pad-standard: 3rem;
    --pad-mobile: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

/* --- UTILITIES --- */
.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.uppercase {
    text-transform: uppercase;
}

.border-b {
    border-bottom: var(--border-thin);
}

.border-t {
    border-top: var(--border-thin);
}

.border-r {
    border-right: var(--border-thin);
}

.border-l {
    border-left: var(--border-thin);
}

h1,
h2,
h3,
h4 {
    color: var(--accent-color);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

a:hover {
    color: var(--personal-accent);
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

img:hover {
    filter: grayscale(0%);
}

/* --- LOADER --- */
.loader-container {
  z-index: 5000;
  background: #eaecfa;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-container.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 250px;
  height: 50px !important;
  line-height: 50px;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: helvetica, arial, sans-serif;
  text-transform: uppercase;
  font-weight: 900;
  color: #516935;
  letter-spacing: 0.2rem;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.loader.fade-out {
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
}


.loader::before,
.loader::after {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  background: #4f302da9;
  position: absolute;
  animation: load 0.7s infinite alternate ease-in-out;
}

.loader::before {
  top: 0;
}

.loader::after {
  bottom: 0;
}

@keyframes load {
  0% {
    left: 0;
    height: 30px;
    width: 15px;
  }
  50% {
    height: 8px;
    width: 40px;
  }
  100% {
    left: 235px;
    height: 30px;
    width: 15px;
  }
}


/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-color);
    border-bottom: var(--border-thick);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 70px;
}

.logo {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* --- HERO SECTION --- */
.hero {
    margin-top: 70px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.6fr;
    border-bottom: var(--border-thick);
    position: relative;
    overflow: hidden;
}

.hero-text {
    padding: var(--pad-standard);
    border-right: var(--border-thin);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background-color: var(--bg-color);
}



.hero-title {
    font-size: clamp(3rem, 8vw, 7rem); 
    line-height: 0.9;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.title-name {
    display: block;
}


/* Strip Text Effect */
.strip-text {
    color: transparent;
    -webkit-text-stroke: 2px var(--accent-color);
    position: relative;
}

.strip-text {
    animation: colorFill 4s forwards;
    animation-iteration-count: infinite;
}

.name-1 {
    animation-delay: 0.2s;
}

.name-2 {
    animation-delay: 0.4s;
}

@keyframes colorFill {
    0% {
        color: transparent;
    }

    50% {
        color: rgba(100, 241, 100, 0.74);
    }

    100% {
        color: var(--accent-color);
    }
}

.title-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
    margin-left : 2px ;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.btn {
    padding: 1rem 2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    border: 3px solid var(--accent-color);
    cursor: pointer;
    transition: 0.2s;
    display: inline-block;
}



.btn::after {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(20%, -35%) rotate(-180deg) scale(0);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  content: url("data:image/svg+xml,%3Csvg width='18' height='17' viewBox='0 0 18 17' fill='none' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath d='M8.87386 0.461548C8.94694 1.56756 9.02001 2.68223 9.33356 3.75354C9.6471 4.82485 10.2176 5.8593 11.137 6.57278C11.8473 7.08815 12.6637 7.46582 13.5369 7.6831C14.7342 8.00638 15.9576 8.24067 17.1957 8.38363C15.1164 8.81736 15.5195 8.70674 14.5883 8.96698C13.4662 9.27926 12.2733 9.66526 11.3256 10.3506C10.2129 11.1551 9.77673 12.2807 9.36653 13.4821C9.07185 14.3496 8.99644 14.4536 8.75127 16.1539C8.66404 14.6597 8.50135 14.0481 8.07229 13.057C7.72339 12.2546 7.36504 11.4306 6.70731 10.806C6.21496 10.3719 5.65082 10.0125 5.03591 9.7412C3.7001 9.0578 2.25267 8.57808 0.75 8.32073C2.01596 8.18193 3.29137 8.02793 4.49132 7.63974C5.69127 7.25155 6.83228 6.59879 7.55602 5.63591C8.62395 4.22846 8.66876 2.39164 8.87386 0.461548Z' fill='white' stroke='black' strokeWidth='1.5' strokeLinecap='square' strokeLinejoin='bevel' /%3E%3C/svg%3E");
}

.btn:hover {
  background-color: #d0f224;
  box-shadow: -4px 3px 0 0 rgb(46, 44, 44);
 
}

.btn:hover::after {
  transform: translate(20%, -35%) rotate(0deg) scale(1);
}

.btn-primary {
  background: rgba(232, 132, 112, 0.691);
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background-color: #d0f224;
  color: var(--color-text-primary);
  border-color: var(--color-text-primary);
  box-shadow: -4px 3px 0 0 black;
  transform: translateY(-4px) translateX(4px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 2px solid rgba(46, 44, 44,0.8);
}

.btn-secondary:hover {
  border-color: var(--color-text-primary);
  background: rgba(56, 68, 36, 0.71);
  color: rgb(232, 255, 196);
  transform: translateY(-2px);
}

.hero-socials {
    display: flex;
    width: fit-content;
    gap: 1.5rem;
    margin-top: auto;
    position: relative;
    z-index: 2;
    border : 2px solid rgba(10, 38, 11, 0.386);
    padding: 1rem;
}

.hero-socials a {
    font-family: 'Inter';
    font-size: 1.4rem;
    font-weight: 800;
    border-bottom: 2px solid transparent;
    
    color : rgba(10, 38, 11, 0.903);
    -webkit-text-stroke: 0.5px var(--accent-color);
}

.hero-socials a:hover {
    color : rgba(97, 76, 32, 0.711);
    border-bottom-color: var(--personal-accent); ;
}

.hero-visual {
    display: flex;
    flex-direction: column;
    border-right: var(--border-thin);
    position: relative;
    overflow: hidden;
}

.hero-visual img {
    flex : 1 ;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
}

.hero-info{
    flex: 1;
    
}

.tech-links {
    height : relative;
    font-family: 'JetBrains Mono', monospace;
    font-size:1.8rem;
    font-weight: 700;
    padding: 2rem;
 background-color: rgba(10, 38, 11, 0.386);
}

.tech-links a {
    text-decoration: none;
    border-bottom: 2px solid transparent;
    color : rgba(67, 40, 15, 0.832); 
}
.tech-links a:hover {
    color :rgba(124, 38, 21, 0.903);
    border-bottom: 2px solid var(--personal-accent);
}

.role {
    border-top : 2px solid rgba(10, 38, 11, 0.903);
    padding: 2rem;
    height: 100%;
    font-family: 'JetBrains Mono', monospace;
}
.role h3 {
    margin-top: 0.5rem;
    font-size: 2rem;
    color : rgba(15, 67, 15, 0.832);
    font-family: Inter ;
}
.role span {
    font-weight: 800;
}


/* HERO STATS COLUMN */
.hero-stats {
    display: flex;
    flex-direction: column;
}

.stat-box {
    flex: 1;
    border-bottom: var(--border-thin);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.stat-box:last-child {
    border-bottom: none;
}

.stat-box h2 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.stat-box.dark {
    background: var(--accent-color);
    color: var(--bg-color);
}

.stat-box.dark h3 {
    color: rgba(180, 245, 180, 0.81);
    font-size: 2rem;
    margin: 0.5rem 0;
}

/* --- TECH STACK MARQUEE --- */
.tech-stack-section {
    border-bottom: var(--border-thick);
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 1.5rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-container {
    display: inline-block;
    width: 100%;
}

.marquee-content {
    display: inline-block;
    animation: scroll 20s linear infinite;
}

.marquee-content span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    margin-right: 3rem;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* --- SECTIONS GENERAL --- */
section {
    width: 100%;
    border-bottom: var(--border-thick);
}

/* --- UPDATES --- */
.updates-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    border-bottom: var(--border-thick);
}

.updates-header {
    padding: var(--pad-standard);
    border-right: var(--border-thin);
    background: #f8f8f8;
}

.updates-header h2 {
    font-size: 4rem;
}

.updates-list {
    display: flex;
    flex-direction: column;
}

.update-item {
    display: flex;
    border-bottom: var(--border-thin);
    padding: 2rem;
    transition: 0.3s;
}

.update-item:last-child {
    border-bottom: none;
}

.update-item:hover {
    background: #fff;
}

.year {
    font-weight: 700;
    margin-right: 2rem;
    color: var(--personal-accent);
}

/* --- RESEARCH --- */
.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: var(--border-thick);
}

.research-card {
    padding: var(--pad-standard);
    border-right: var(--border-thin);
   
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 400px;
}

.research-card:nth-child(2n) {
    border-right: none;
}

.research-card h3 {
    font-size: 2.5rem;
    margin: 1rem 0;
}

/* --- BLOG --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: var(--border-thick);
}

.blog-card {
    padding: 2rem;
    border-right: var(--border-thin);
    max-height: 350px;
    display: flex;
    align-items: flex-start;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: 0.3s;
}

.blog-card:hover {
    background-color: #e0e0e0;
}

.blog-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* --- PROJECTS --- */
.project-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: var(--border-thin);
}

.project-row.reverse .p-img {
    order: 2;
    border-left: var(--border-thin);
    border-right: none;
}

.project-row.reverse .p-info {
    order: 1;
}

.p-img {
    height: 500px;
    border-right: var(--border-thin);
    overflow: hidden;
}

.p-img img {
    transition: transform 0.5s ease;
}

.p-img:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.p-info {
    padding: var(--pad-standard);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tag-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 0.2rem 0.6rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    border-radius: 2px;
}

/* --- PUBLICATIONS --- */
.pub-list {
    border-bottom: var(--border-thick);
}

.pub-item {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: var(--border-thin);
}

.pub-item:last-child {
    border-bottom: none;
}

/* --- ARTWORK --- */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: var(--border-thick);
}

.art-item {
    aspect-ratio: 1;
    border-right: var(--border-thin);
    border-bottom: var(--border-thin);
    overflow: hidden;
}

.art-item img {
    transition: 0.3s;
}

.art-item:hover img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

/* --- EDUCATION --- */
.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: var(--border-thick);
}

.edu-col {
    padding: var(--pad-standard);
    border-right: var(--border-thin);
}

.edu-col h2 {
    font-size: 3rem;
    font-family: 'Inter';
    margin-bottom: 2rem;
    color : rgba(79, 99, 48, 0.433);
    -webkit-text-stroke: 1px var(--accent-color);
}

.edu-col:last-child {
    border-right: none;
}

.edu-item {
    margin-bottom: 2rem;
}

.edu-item h3 {
    font-size: 1.5rem;
}

/* Footer */
footer {
    padding: 4rem;
    border-bottom: var(--grid-line);
}

.footer-content {
    display: flex;
    flex-direction: column;
}

.footer-main h2 {
    font-family: var(--font-main);
    font-size: 8vw;
    line-height: 0.9;
    margin-bottom: 2rem;
}

.email-link {
    font-size: 2rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 2px solid var(--text-color);
}

.footer-links {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: var(--grid-line);
}

.socials a {
    color: var(--text-color);
    text-decoration: none;
    margin-right: 2rem;
    font-weight: 700;
    font-size: 1.2rem;
}
.socials a:hover {
    color: var(--personal-accent);
}

.footer-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
}


/* --- RESPONSIVE --- */

@media (min-width: 1400px) {
    .hero-title {
        font-size: 8rem;
    }
    .hero-text {
        padding: 5rem;
        margin-left: 1rem;
    }
}

@media (max-width: 1024px) {
    .hero-title {
        font-size: 5rem;
    }

    
    .updates-section,
    .research-grid,
    .project-row,
    .edu-grid {
        grid-template-columns: 1fr;
    }

    .updates-header,
    .research-card,
    .p-img,
    .edu-col {
        border-right: none;
        border-bottom: var(--border-thin);
    }

    .project-row.reverse .p-img {
        order: unset;
        border-left: none;
    }

    .artwork-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .role h3 {
        font-size: 1.5rem;
        padding: 5px;
    }
}

@media (max-width: 768px) {
    nav {
        height: auto;
        flex-wrap: wrap;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        gap : 10px;
    }

    .nav-links a {
        margin-left: 0;
        margin-right: 1px;
        white-space: nowrap;
        font-size: 1rem;
    }
    .art-nav {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: fit-content;
        gap : 2px;
    }

    .hero-text {
        margin-top: 1rem;
        padding: var(--pad-mobile);
        min-height: 50vh;
        
    }

    .title-name {
        font-size: 4rem;
    }
    .title-line {
        font-family: 'Inter';
        font-size: 0.8rem;
        font-weight: 800;
        color : rgba(93, 74, 44, 0.769);
        -webkit-text-stroke: 0.5px var(--accent-color);
    }

    .hero-visual {
        height: auto;
        border-right: none;
        border-bottom: var(--border-thin);
    }
    .hero-visual img {
        display: none;
    }


    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hero-socials {
       border : none ;
       flex-direction: row;
         justify-content: center;
         width: 100%;
    }

    .hero-socials a {
        font-size: 1.2rem;
       border-bottom : 1.5px solid rgba(10, 38, 11, 0.603);
    }

    .role span {
        font-size: 1rem;
        font-weight: 600;
    }

     .role h3 {
        padding: 2px;
        font-size: 1.5rem;
    }

    .stat-box {
        border-right: var(--border-thin);
        border-bottom: none;
        padding: 1.5rem;
    }

    .stat-box:last-child {
        border-right: none;
        width: 100%;
        border-top: var(--border-thin);
    }

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

    .blog-card {
        border-right: none;
        border-bottom: var(--border-thin);
    }
     .p-img {
        height: 425px; /* Reduce image height */
    }
}

@media (max-width: 480px) {
    /* General Padding */
    :root {
        --pad-standard: 0rem;
        --pad-mobile: 1.5rem;
    }

    /* Navigation */
    nav {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem; /* Smaller title */
    }
    
    .title-line {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }

    .hero-buttons {
        width: 100%;
        margin-bottom: 16px;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0.3rem;
        color : rgba(10, 38, 11, 0.903);
    }

    .hero-socials {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .hero-socials a {
        font-size: 1rem;
        margin-right: 0;
    }

    /* Stats */
    .stat-box h2 {
        font-size: 2.5rem;
    }

    /* Updates */
    .updates-header h2 {
        font-size: 2.5rem;
        padding: 16px
    }
    .updates-header p{
        padding: 16px;
        margin-top: 0 !important;
    }

    /* Research & Projects */

     .research-card{
        padding: 16px;
     }

    .research-card h3, 
    .p-info h2 {
        font-size: 2rem !important; /* Force override inline styles if any */
        
    }

    .p-info{
        margin-top: 0.9rem;
    }
    
    .p-img {
        height: 200px; /* Reduce image height */
        width: 100%;
    }

    .project-row {
        padding : 16px;
    }

    /* Artwork */
    .artwork-grid {
        grid-template-columns: 1fr; /* Single column for artwork */
    }


    .edu-col {
        padding: 16px;
    }

    .edu-col h2 {
        font-size: 2.5rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1rem;
    }

    .footer-main h2 {
        font-size: 3rem;
    }

    .email-link {
        font-size: 1.2rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }

    .socials {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .socials a {
        margin-right: 0;
    }
    
    .footer-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 380px) {
    /* General Padding */
    :root{
        --pad-standard: 0rem;
        --pad-mobile: 0rem;
    }
    body {
       padding: 2px;
    }
}

/* --- ANIMATIONS --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* --- MUSIC TOGGLE --- */
.music-toggle {
    position: fixed;
    bottom: 2vh;
    right: 1vw  ;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: 2px solid var(--bg-color);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s, background-color 0.2s;
}

.music-toggle:hover {
    transform: scale(1.1);
    background-color: var(--personal-accent);
}

.music-toggle .material-symbols-outlined {
    font-size: 24px;
}